Skip to content
Snippets Groups Projects
Unverified Commit 16540ed9 authored by Samuel Couillard's avatar Samuel Couillard Committed by GitHub
Browse files

Fix Verify Account page (#4100)

* Initial commit

* Fix typo

* Remove return home button

* esf
parent f3f09853
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ export default function App() { ...@@ -30,7 +30,7 @@ export default function App() {
return ( return (
<> <>
{currentUser?.signed_in && <Header /> } {currentUser?.signed_in && <Header /> }
<BackgroundBuffer /> {currentUser?.verified && <BackgroundBuffer /> }
<Container className={pageHeight}> <Container className={pageHeight}>
<Outlet /> <Outlet />
</Container> </Container>
......
import React from 'react'; import React from 'react';
import { import {
Button, Card, Col, Row, Button, Card,
} from 'react-bootstrap'; } from 'react-bootstrap';
import { InformationCircleIcon } from '@heroicons/react/24/outline';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useAuth } from '../../../contexts/auth/AuthProvider'; import { useAuth } from '../../../contexts/auth/AuthProvider';
import useCreateActivationLink from '../../../hooks/mutations/account_activation/useCreateActivationLink'; import useCreateActivationLink from '../../../hooks/mutations/account_activation/useCreateActivationLink';
import Spinner from '../../shared_components/utilities/Spinner'; import Spinner from '../../shared_components/utilities/Spinner';
import Logo from '../../shared_components/Logo';
export default function VerifyAccount() { export default function VerifyAccount() {
const currentUser = useAuth(); const currentUser = useAuth();
...@@ -14,23 +14,24 @@ export default function VerifyAccount() { ...@@ -14,23 +14,24 @@ export default function VerifyAccount() {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Row className="vertical-center text-center"> <div className="vertical-buffer">
<Row className="mb-2"> <div className="text-center pb-4">
<h1>{ t('account_activation_page.title') }</h1> <Logo size="medium" />
</Row> </div>
<Row> <Card className="col-md-4 mx-auto p-4 border-0 shadow-sm text-center">
<Col md={8} className="mx-auto"> <Card.Title className="pb-2 fs-1 text-danger">{ t('account_activation_page.title') }</Card.Title>
<Card className="p-5 border-0 shadow-sm"> <strong className="mb-3">{ t('account_activation_page.account_unverified') }</strong>
<Card.Title className="text-center pb-2"> <InformationCircleIcon className="hi-xl" /> </Card.Title> <span className="mb-3">{ t('account_activation_page.message') }</span>
<pre className="text-muted"> <span className="mb-4">{ t('account_activation_page.resend_activation_link') }</span>
{ t('account_activation_page.message') } <Button
</pre> variant="brand"
<Button variant="brand" onClick={createActivationLinkAPI.mutate} disabled={createActivationLinkAPI.isLoading}> className="btn btn-lg"
onClick={createActivationLinkAPI.mutate}
disabled={createActivationLinkAPI.isLoading}
>
{ t('account_activation_page.resend_btn_lbl') } {createActivationLinkAPI.isLoading && <Spinner />} { t('account_activation_page.resend_btn_lbl') } {createActivationLinkAPI.isLoading && <Spinner />}
</Button> </Button>
</Card> </Card>
</Col> </div>
</Row>
</Row>
); );
} }
...@@ -367,7 +367,9 @@ ...@@ -367,7 +367,9 @@
}, },
"account_activation_page": { "account_activation_page": {
"title": "Account Activation", "title": "Account Activation",
"message": "Your account has not been verified yet.\nIn order to use Greenlight full features you are kindly invited to verify your account.\nIf you haven't received an activation link or if you are having a problem using it,\nplease click the resend button below to get a new link.", "account_unverified": "Your account has not been verified yet.",
"message": "In order to use Greenlight, please verify your account by following the instructions in the activation email that was sent to you.",
"resend_activation_link": "If you haven't received an activation email or if you are having a problem using it, click the resend button below to request a new activation email.",
"resend_btn_lbl": "Resend Verification" "resend_btn_lbl": "Resend Verification"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment