Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
fix: cleaned up auth header
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed May 27, 2024
1 parent a563c84 commit a8a1a28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const metadata = {

export default async function RootLayout({ children }) {
const session = await getServerSession(authOptions);
console.log("SESSION", session);

return (
<html lang="en" className="h-full bg-gray-100">
Expand Down
20 changes: 4 additions & 16 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,12 @@ export default function Header({ session }) {
{/* Right section on desktop */}
<div className="hidden lg:ml-4 lg:flex lg:items-center lg:pr-0.5">
{!session && (
<form
action={async () => {
// "use server";
await signIn();
}}
>
<button>#</button>
</form>
<button onClick={async () => await signIn()}>#</button>
)}
{session && (
<form
action={async () => {
// "use server";
await signOut();
}}
>
<button>Sign Out</button>
</form>
<button onClick={async () => await signOut()}>
Sign Out
</button>
)}

<button
Expand Down

0 comments on commit a8a1a28

Please # to comment.