Skip to content

Commit

Permalink
feat: added sign out button, better buttons, and better error
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Nov 14, 2023
1 parent 88fae00 commit 8eb7150
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pages/MentorDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ function MentorDashboard() {
src={`https://github.com/${authContext.userData.username}.png`}
/>
</div>

<h2 className="font-bold text-2xl text-center ">
{authContext.userData.name} (@{authContext.userData.username})
</h2>
<p className="text-center w-full">
<Link to={ROUTER_PATHS.MENTOR_FORM}>Edit</Link>
</p>

<div className="flex mt-2 justify-center gap-3">
<Link className="text-center py-2 px-5 py-auto h-fit text-indigo-100 bg-indigo-700 rounded-lg transition-colors duration-150 focus:shadow-outline hover:bg-indigo-800 disabled:bg-gray-600" to={ROUTER_PATHS.MENTOR_FORM}>Edit Info</Link>
<button className="text-center py-2 px-5 py-auto h-fit text-indigo-100 bg-red-700 rounded-lg transition-colors duration-150 focus:shadow-outline hover:bg-red-800 disabled:bg-gray-600" onClick={authContext.onLogout}>Sign Out</button>
</div>
</div>
<div className="relative overflow-x-hidden flex-1 flex-col flex flex-wrap">
<div className="lg:pt-28">
Expand All @@ -86,7 +89,7 @@ function MentorDashboard() {
</Link>
</div>
) : (
error
<p className="text-center text-red-500">{error}</p>
)}
</div>
</div>
Expand Down

0 comments on commit 8eb7150

Please sign in to comment.