Use Link.

This commit is contained in:
Yang Luo
2021-03-26 21:58:10 +08:00
parent 6880c28194
commit fa358654e6
6 changed files with 26 additions and 19 deletions

View File

@ -140,9 +140,9 @@ class ApplicationListPage extends React.Component {
sorter: (a, b) => a.organization.localeCompare(b.organization), sorter: (a, b) => a.organization.localeCompare(b.organization),
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<a href={`/organizations/${text}`}> <Link to={`/organizations/${text}`}>
{text} {text}
</a> </Link>
) )
} }
}, },
@ -154,9 +154,9 @@ class ApplicationListPage extends React.Component {
sorter: (a, b) => a.providers.localeCompare(b.providers), sorter: (a, b) => a.providers.localeCompare(b.providers),
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<a href={`/providers/${text}`}> <Link to={`/providers/${text}`}>
{text} {text}
</a> </Link>
) )
} }
}, },

View File

@ -118,9 +118,9 @@ class TokenListPage extends React.Component {
sorter: (a, b) => a.application.localeCompare(b.application), sorter: (a, b) => a.application.localeCompare(b.application),
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<a href={`/applications/${text}`}> <Link to={`/applications/${text}`}>
{text} {text}
</a> </Link>
) )
} }
}, },

View File

@ -98,9 +98,9 @@ class UserListPage extends React.Component {
sorter: (a, b) => a.owner.localeCompare(b.owner), sorter: (a, b) => a.owner.localeCompare(b.owner),
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<a href={`/organizations/${text}`}> <Link to={`/organizations/${text}`}>
{text} {text}
</a> </Link>
) )
} }
}, },

View File

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
import React from "react"; import React from "react";
import {Link} from "react-router-dom";
import {Button, Checkbox, Col, Form, Input, Row} from "antd"; import {Button, Checkbox, Col, Form, Input, Row} from "antd";
import {LockOutlined, UserOutlined} from "@ant-design/icons"; import {LockOutlined, UserOutlined} from "@ant-design/icons";
import * as AuthBackend from "./AuthBackend"; import * as AuthBackend from "./AuthBackend";
@ -169,7 +170,10 @@ class LoginPage extends React.Component {
Login Login
</Button> </Button>
<div style={{float: "right"}}> <div style={{float: "right"}}>
No account yet, <a href="/register">sign up now</a> No account yet,&nbsp;
<Link to={"/register"}>
sign up now
</Link>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>

View File

@ -13,11 +13,10 @@
// limitations under the License. // limitations under the License.
import React from 'react'; import React from 'react';
import {Link} from "react-router-dom";
import {Form, Input, Select, Checkbox, Button, Row, Col} from 'antd'; import {Form, Input, Select, Checkbox, Button, Row, Col} from 'antd';
import * as Setting from "../Setting"; import * as Setting from "../Setting";
import * as AuthBackend from "./AuthBackend"; import * as AuthBackend from "./AuthBackend";
import i18next from "i18next";
import {Link} from "react-router-dom";
const { Option } = Select; const { Option } = Select;
@ -214,16 +213,19 @@ class RegisterPage extends React.Component {
</Form.Item> </Form.Item>
<Form.Item name="agreement" valuePropName="checked" {...tailFormItemLayout}> <Form.Item name="agreement" valuePropName="checked" {...tailFormItemLayout}>
<Checkbox> <Checkbox>
Accept <a href="/agreement">Terms of Use</a> Accept&nbsp;
<Link to={"/agreement"}>
Terms of Use
</Link>
</Checkbox> </Checkbox>
</Form.Item> </Form.Item>
<Form.Item {...tailFormItemLayout}> <Form.Item {...tailFormItemLayout}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
Register Register
</Button> </Button>
&nbsp;&nbsp;&nbsp;Have account? &nbsp;&nbsp;&nbsp;Have account?&nbsp;
<Link to="/login"> <Link to={"/login"}>
<a href="/login">sign in now</a> sign in now
</Link> </Link>
</Form.Item> </Form.Item>
</Form> </Form>

View File

@ -13,7 +13,8 @@
// limitations under the License. // limitations under the License.
import React from "react"; import React from "react";
import { Result, Button } from 'antd'; import {Link} from "react-router-dom";
import {Result, Button} from 'antd';
class ResultPage extends React.Component { class ResultPage extends React.Component {
constructor(props) { constructor(props) {
@ -31,11 +32,11 @@ class ResultPage extends React.Component {
title="Your account is registered" title="Your account is registered"
subTitle="Please click the below button to login" subTitle="Please click the below button to login"
extra={[ extra={[
<a href="/login"> <Link to="/login">
<Button type="primary" key="console"> <Button type="primary" key="login">
Login Login
</Button> </Button>
</a> </Link>
]} ]}
/> />
</div> </div>