forked from GreenPioneer/nx_firebase_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from tirzah-dev/signupPage
Signup page
- Loading branch information
Showing
12 changed files
with
287 additions
and
158 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
74 changes: 70 additions & 4 deletions
74
apps/frontend/src/app/views/forgotPassword/ForgotPassword.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 |
---|---|---|
@@ -1,9 +1,75 @@ | ||
import React from "react" | ||
import React, { ChangeEvent, useEffect } from 'react'; | ||
import { UserContext } from '../../app'; | ||
import { useGoogleLogin } from '@react-oauth/google'; | ||
import axios from 'axios'; | ||
import { createUserData } from '../../api-client/apiModules/users'; | ||
import { AuthLayout } from '../../components/authlayout/AuthLayout'; | ||
import { Link, useNavigate } from 'react-router-dom'; | ||
import googleGImage from "../../images/logos/googleGImage.svg" | ||
import loginListThreeFilled from "../../images/logos/loginListThreeFilled.svg" | ||
import loginVector from "../../images/logos/loginVector.svg" | ||
import loginCrystalBall from "../../images/logos/loginCrystalBall.svg" | ||
import loginGroup103 from "../../images/logos/loginGroup103.svg" | ||
import "./forgotpassword.css" | ||
import { auth } from "../../firebase/firebase" | ||
import { signInWithEmailAndPassword } from "firebase/auth" | ||
|
||
export const ForgotPassword = () => { | ||
|
||
const [email, setEmail] = React.useState("") | ||
const [isDisabled, setIsDisabled] = React.useState(true) | ||
|
||
useEffect(() => { | ||
const emailRegex = new RegExp(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/); | ||
if (!emailRegex.test(email)) { | ||
setIsDisabled(true) | ||
} else { | ||
setIsDisabled(false) | ||
} | ||
}) | ||
|
||
const onEmailChange = (e: React.ChangeEvent<any>) => { | ||
setEmail(e.target.value) | ||
// setAuthError("") | ||
} | ||
|
||
return ( | ||
<div> | ||
Forgot Password | ||
</div> | ||
<AuthLayout className="fpLayout"> | ||
<div className='fpGroup103Container'> | ||
<img src={loginGroup103} alt="" className="fpGroup103" style={{gridRowStart: "1", gridRowEnd: "2"}}/> | ||
</div> | ||
<div className='fpLogoContainer'> | ||
<div className="fpLogo" style={{gridRowStart: "2", gridRowEnd: "3"}}> | ||
<h1 className="fpW">W</h1> | ||
<img src={loginListThreeFilled} alt="" className="fpListThreeFilled"/> | ||
<h1 className="fpL">L</h1> | ||
<img src={loginVector} alt="" className="fpVector"/> | ||
<img src={loginCrystalBall} alt="" className="fpCrystalBall"/> | ||
</div> | ||
</div> | ||
<div> | ||
<h2>Enter a valid email address to receive a verification code</h2> | ||
</div> | ||
<div> | ||
<h2>Email</h2> | ||
<div className="loginEmailInputContainer"> | ||
<input required className="loginEmailInput" type="text" value={email} onChange={onEmailChange} /> | ||
</div> | ||
</div> | ||
<div className='loginButtonContainer' style={{gridRowStart: "6", gridRowEnd: "7"}}> | ||
<button className="loginButton" type="submit" disabled={isDisabled} style={{backgroundColor: isDisabled ? "#6F6F6F" : "#000"}}> | ||
<span className="loginButtonText"> | ||
Submit | ||
</span> | ||
</button> | ||
</div> | ||
<div> | ||
<button className="loginSignupButton"> | ||
<span className="loginSignupButtonText"> | ||
<Link to="/signup">Sign Up</Link> | ||
</span> | ||
</button> | ||
</div> | ||
</AuthLayout> | ||
) | ||
} |
68 changes: 68 additions & 0 deletions
68
apps/frontend/src/app/views/forgotPassword/forgotpassword.css
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,68 @@ | ||
.fpLayout { | ||
display: grid; | ||
} | ||
.fpLogoContainer { | ||
display: flex; | ||
justify-content: center; | ||
top: 20px; | ||
position: relative; | ||
} | ||
.fpLogo { | ||
width: 196px; | ||
height: 100px; | ||
flex-shrink: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
column-gap: 7px; | ||
} | ||
.fpW { | ||
color: #000; | ||
font-family: Fontspring-DEMO-capitana-medium; | ||
font-size: 40px; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: normal; | ||
} | ||
.fpListThreeFilled { | ||
width: 40px; | ||
height: 40px; | ||
flex-shrink: 0; | ||
fill: var(--Primary-Blue, #148CFB); | ||
} | ||
.fpL { | ||
display: flex; | ||
width: 23px; | ||
height: 48px; | ||
flex-direction: column; | ||
justify-content: space-evenly; | ||
flex-shrink: 0; | ||
color: #000; | ||
font-family: Fontspring-DEMO-capitana-medium; | ||
font-size: 40px; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: normal; | ||
} | ||
.fpVector { | ||
width: 3px; | ||
height: 70px; | ||
flex-shrink: 0; | ||
stroke-width: 3px; | ||
stroke: #000; | ||
} | ||
.fpCrystalBall { | ||
width: 40px; | ||
height: 40px; | ||
flex-shrink: 0; | ||
} | ||
.fpGroup103Container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: top; | ||
} | ||
.fpGroup103 { | ||
width: 128px; | ||
height: 39px; | ||
flex-shrink: 0; | ||
} |
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 was deleted.
Oops, something went wrong.
Empty file.
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
Oops, something went wrong.