Skip to content

Commit

Permalink
added back button and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvellousz committed Mar 15, 2024
1 parent d84b38e commit de6bccf
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ export default function Navbar() {
<div className="flex">
<div className="m-3">Nav</div>
{status === "authenticated" ? (
<button
onClick={() => signOut()} >
Sign Out
</button>
<>
{window.location.pathname === "/events/event1/teamCode" && (
<button
className="px-4 py-2 rounded-full capitalize cursor-pointer bg-gradient-to-r from-[#03A3FE] to-[#00FFA3] mt-4 flex items-center font-bold"
onClick={() => window.history.back()}>Back</button>
)}
<button
className="m-3 px-4 py-2 rounded-full capitalize bg-red-500 text-white px-3 py-1 border-0 rounded-lg cursor-pointer font-bold"
onClick={() => signOut()}>Sign Out</button>
</>
) : (
<button
onClick={() => signIn("google")} >
Sign In
</button>
<button
className="px-4 py-2 rounded-full capitalize bg-red-500 text-white px-3 py-1 border-0 rounded-lg cursor-pointer font-bold"
onClick={() => signIn("google")}>Sign In</button>
)}
</div>
);
Expand Down

0 comments on commit de6bccf

Please sign in to comment.