generated from agiledev-students-fall2023/generic-project-repository
-
Notifications
You must be signed in to change notification settings - Fork 5
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 #61 from lunnnnnn/master
Account detail, url routing fix, favorite list
- Loading branch information
Showing
5 changed files
with
71 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
const Account = () => { | ||
import React from "react" | ||
import AccountLayout from "./AccountLayout"; | ||
import { Link } from "react-router-dom"; | ||
import PopupLink from '../../components/popup/popupLink'; | ||
|
||
const Account = () => { | ||
// parameters: pic, username, email, | ||
let props = {}; | ||
props.pic = "https://cdn.icon-icons.com/icons2/2645/PNG/512/person_icon_159921.png" | ||
props.username = "John Doe" | ||
props.email = "[email protected]" | ||
|
||
return( | ||
<> | ||
account page | ||
</> | ||
<div> | ||
<div className="min-h-screen flex flex-col items-center justify-center"> | ||
<Link to="/ChangeProfilePic"> | ||
<img className="w-32 h-32 rounded-full object-cover cursor-pointer" src={props.pic} alt="profile picture" /> | ||
</Link> | ||
|
||
<h1 className="text-2xl font-bold mt-4">{props.username}</h1> | ||
<p className="text-gray-500">{props.email}</p> | ||
{/* Add a button that redirects to another place */} | ||
<Link to="/edit"> | ||
<button className="bg-white-500 text-black font-bold py-2 px-4 rounded mt-4"> | ||
Edit Account | ||
</button> | ||
</Link> | ||
<Link to="/Favorite"> | ||
<button className="bg-white-500 text-black font-bold py-2 px-4 rounded mt-4"> | ||
My Fav | ||
</button> | ||
</Link> | ||
</div> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default Account | ||
export default Account |
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,8 @@ | ||
const Favorite = () => { | ||
return( | ||
<div> | ||
<h1 className="text-2xl font-bold mt-4">Favorites</h1> | ||
</div> | ||
) | ||
} | ||
export default Favorite |