-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added email confirmation page (#3573)
* Added email confirmation page
- Loading branch information
1 parent
f3e09cd
commit a162a65
Showing
5 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
cvat-ui/src/components/email-confirmation-page/email-confirmed.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (C) 2021 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import React, { useRef } from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import { Col, Row } from 'antd/lib/grid'; | ||
import Layout from 'antd/lib/layout'; | ||
import Statistic from 'antd/lib/statistic'; | ||
import './styles.scss'; | ||
|
||
const { Content } = Layout; | ||
const { Countdown } = Statistic; | ||
|
||
/** | ||
* Component for displaying email confirmation message and then redirecting to the login page | ||
*/ | ||
|
||
function EmailConfirmationPage(): JSX.Element { | ||
const linkRef = useRef(); | ||
const onFinish = () => { | ||
linkRef.current.click(); | ||
}; | ||
return ( | ||
<Layout> | ||
<Content> | ||
<Row justify='center' align='middle' id='email-confirmation-page-container'> | ||
<Col> | ||
<h1>Your email is confirmed</h1> | ||
<Countdown format='ss' title='Redirecting to login page after...' value={Date.now() + 1000 * 6} onFinish={onFinish} /> | ||
<Link to='/auth/login' ref={linkRef}>Or click this link</Link> | ||
</Col> | ||
</Row> | ||
</Content> | ||
</Layout> | ||
); | ||
} | ||
|
||
export default EmailConfirmationPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (C) 2021 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
#email-confirmation-page-container { | ||
height: 100%; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters