-
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.
Merge pull request #36 from bliutech/test
signout button
- Loading branch information
Showing
5 changed files
with
51 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
import { useState } from "react"; | ||
import { useCookies } from "react-cookie"; | ||
import { Link } from "react-router-dom"; | ||
import styles from "../styles/components/LoginForm.module.css"; | ||
import { useNavigate } from "react-router-dom"; | ||
import React from "react"; | ||
|
||
function ProfilePage() { | ||
const navigate = useNavigate(); | ||
document.title = "Account"; | ||
const [cookies, setCookie, removeCookie] = useCookies(""); | ||
const [auth, setAuth] = useState(false); | ||
// if (true) { | ||
// setCookie("name", "cy"); | ||
// } | ||
|
||
return <p></p>; | ||
function handleSignout() { | ||
removeCookie("name"); | ||
navigate("/"); | ||
} | ||
|
||
return ( | ||
<div> | ||
<p>{cookies.name}'s account</p> | ||
<li> | ||
<input | ||
type="button" | ||
id={styles.button} | ||
placeholder="Signout" | ||
onClick={() => handleSignout()} | ||
></input> | ||
</li> | ||
</div> | ||
); | ||
} | ||
|
||
export default ProfilePage; | ||
|
||
// **** PLEASE ADD A BUTTON TO SIGN UP **** | ||
// **** button needs prettyification **** |
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