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

View File

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

View File

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

View File

@ -13,6 +13,7 @@
// limitations under the License.
import React from "react";
import {Link} from "react-router-dom";
import {Button, Checkbox, Col, Form, Input, Row} from "antd";
import {LockOutlined, UserOutlined} from "@ant-design/icons";
import * as AuthBackend from "./AuthBackend";
@ -169,7 +170,10 @@ class LoginPage extends React.Component {
Login
</Button>
<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>
</Form.Item>
<Form.Item>

View File

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

View File

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