Skip to content

Commit

Permalink
fixed session and login issues on header
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Baz authored and Tim Baz committed Jun 27, 2023
1 parent e01b7a7 commit c7507e5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,14 @@ export const metadata: Metadata = {
};

export default async function RootLayout({ children }: RootLayoutProps) {
const {
data: { session },
} = await supabase.auth.getSession();

const profileImageUrl =
session?.user?.user_metadata.picture ||
session?.user?.user_metadata.avatar_url;
return (
<html lang="en" className="layout" suppressHydrationWarning>
<body
className={cn("layout h-full scroll-smooth", fontSans.variable)}
style={{ WebkitTapHighlightColor: "transparent" }}
>
<Wrapper>
<Header
session={session || undefined}
profileImageUrl={profileImageUrl}
/>
<Header />
<Container>
<Grid>
<Main>{children}</Main>
Expand Down

0 comments on commit c7507e5

Please sign in to comment.