-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBC22-2869: FE integration in saved route and account pages
- Loading branch information
Showing
10 changed files
with
176 additions
and
16 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
@import "../styles/variables.scss"; | ||
|
||
.account-page { | ||
.email-address { | ||
.email, .header { | ||
font-size: 1.1rem; | ||
font-weight: 700; | ||
color: $MyAccountHeader; | ||
} | ||
|
||
.email { | ||
font-weight: 400; | ||
} | ||
|
||
.not-verified { | ||
background-color: $MyAccountWarning; | ||
color: $MyAccountWarningText; | ||
padding: 0.5rem 1rem; | ||
font-size: 0.875rem; | ||
} | ||
} | ||
} |
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
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,59 @@ | ||
// React | ||
import React, { useContext, useEffect } from 'react'; | ||
|
||
// External imports | ||
import Container from 'react-bootstrap/Container'; | ||
|
||
// Internal imports | ||
import { AuthContext } from '../App'; | ||
import { sendVerificationEmail } from "../Components/data/user"; | ||
import Footer from '../Footer.js'; | ||
import PageHeader from '../PageHeader'; | ||
|
||
// Styling | ||
import './VerifyEmailPage.scss'; | ||
|
||
export default function VerifyEmailPage() { | ||
const { authContext } = useContext(AuthContext); | ||
|
||
useEffect(() => { | ||
if (authContext.loginStateKnown && !authContext.verified) { | ||
sendVerificationEmail(); | ||
} | ||
}, [authContext]); | ||
|
||
return ( | ||
<div className="verify-email-page"> | ||
<PageHeader | ||
title="Please verify your email" | ||
description=""> | ||
</PageHeader> | ||
|
||
<Container> | ||
<p className='base-instructions'> | ||
To enable notifications your email account needs to be | ||
verified. We’ve sent an email to <b>{authContext.email}</b> with | ||
a link to verify that the account is yours. | ||
</p> | ||
|
||
<p> | ||
Once you click on the link, you will be able to receive | ||
notifications by email for your favourite routes. | ||
</p> | ||
|
||
<p> | ||
<b>If you can’t find the email</b>, please check the following: | ||
<ul> | ||
<li>double check the spelling of your email address</li> | ||
<li>check your junk mail folders, and add</li> | ||
<li>add [email protected] to your whitelist</li> | ||
</ul> | ||
</p> | ||
|
||
<button className='btn btn-outline-primary' onClick={sendVerificationEmail} onKeyPress={sendVerificationEmail}>Send another verification Email</button> | ||
</Container> | ||
|
||
<Footer/> | ||
</div> | ||
); | ||
} |
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,12 @@ | ||
@import "../styles/variables.scss"; | ||
|
||
.verify-email-page { | ||
p { | ||
font-size: 1rem; | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
.instructions { | ||
font-size: 1.1rem; | ||
} | ||
} |
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