-
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.
- Loading branch information
Victor Wei
authored and
Victor Wei
committed
Oct 22, 2024
1 parent
d5879cb
commit b5cd843
Showing
8 changed files
with
66 additions
and
231 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,22 +115,61 @@ const HomePage = (): React.ReactElement => { | |
Efficace. | ||
</Text> | ||
</Box> | ||
<GoogleLogin | ||
clientId={process.env.REACT_APP_OAUTH_CLIENT_ID || ""} | ||
buttonText="Login with Google" | ||
onSuccess={(response: GoogleResponse): void => { | ||
if ("tokenId" in response) { | ||
onGoogleLoginSuccess(response.tokenId); | ||
} else { | ||
|
||
<form> | ||
<div> | ||
<input | ||
type="email" | ||
value={email} | ||
onChange={(event) => setEmail(event.target.value)} | ||
placeholder="[email protected]" | ||
/> | ||
</div> | ||
<div> | ||
<input | ||
type="password" | ||
value={password} | ||
onChange={(event) => setPassword(event.target.value)} | ||
placeholder="password" | ||
/> | ||
</div> | ||
<div> | ||
<button | ||
className="btn btn-primary" | ||
type="button" | ||
onClick={onLogInClick} | ||
> | ||
Log In | ||
</button> | ||
</div> | ||
|
||
<GoogleLogin | ||
clientId={process.env.REACT_APP_OAUTH_CLIENT_ID || ""} | ||
buttonText="Login with Google" | ||
onSuccess={(response: GoogleResponse): void => { | ||
if ("tokenId" in response) { | ||
onGoogleLoginSuccess(response.tokenId); | ||
} else { | ||
// eslint-disable-next-line no-alert | ||
window.alert(response); | ||
} | ||
}} | ||
onFailure={(error: GoogleErrorResponse) => | ||
// eslint-disable-next-line no-alert | ||
window.alert(response); | ||
window.alert(JSON.stringify(error)) | ||
} | ||
}} | ||
onFailure={(error: GoogleErrorResponse) => | ||
// eslint-disable-next-line no-alert | ||
window.alert(JSON.stringify(error)) | ||
} | ||
/> | ||
/> | ||
</form> | ||
|
||
<div> | ||
<button | ||
className="btn btn-primary" | ||
type="button" | ||
onClick={onSignUpClick} | ||
> | ||
Sign Up | ||
</button> | ||
</div> | ||
</Box> | ||
</Flex> | ||
); | ||
|
This file was deleted.
Oops, something went wrong.
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.
This file was deleted.
Oops, something went wrong.
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