fix: <Link> to <a> and table key

Signed-off-by: WindSpirit <simon343riley@gmail.com>
This commit is contained in:
WindSpirit 2021-06-04 21:09:34 +08:00
parent 7434d0f3d3
commit 860fe91725
2 changed files with 8 additions and 10 deletions

View File

@ -95,7 +95,7 @@ class UrlTable extends React.Component {
];
return (
<Table rowKey="id" columns={columns} dataSource={table.map(row => ({id: row}))} size="middle" bordered pagination={{pageSize: 100}}
<Table rowKey="index" columns={columns} dataSource={table.map((row, i) => ({id: row, index: i}))} size="middle" bordered pagination={{pageSize: 100}}
title={() => (
<div>
{this.props.title}&nbsp;&nbsp;&nbsp;&nbsp;

View File

@ -194,13 +194,11 @@ class LoginPage extends React.Component {
{i18next.t("login:Auto login")}
</Checkbox>
</Form.Item>
<div style={{float: "right"}} onClick={() => {
<a style={{float: "right"}} onClick={() => {
Setting.goToForget(this, application);
}}>
<a>
{i18next.t("login:Forgot password?")}
</a>
</div>
</Form.Item>
<Form.Item>
<Button
@ -215,11 +213,11 @@ class LoginPage extends React.Component {
!application.enableSignUp ? null : (
<div style={{float: "right"}}>
{i18next.t("login:No account yet?")}&nbsp;
<Link onClick={() => {
<a onClick={() => {
Setting.goToSignup(this, application);
}}>
{i18next.t("login:sign up now")}
</Link>
</a>
</div>
)
}
@ -257,11 +255,11 @@ class LoginPage extends React.Component {
<br/>
<div style={{float: "right"}}>
{i18next.t("login:No account yet?")}&nbsp;
<Link onClick={() => {
<a onClick={() => {
Setting.goToSignup(this, application);
}}>
{i18next.t("login:sign up now")}
</Link>
</a>
</div>
</div>
)