Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary-MacArthur committed Dec 14, 2024
1 parent 7389720 commit 3c9e447
Show file tree
Hide file tree
Showing 7 changed files with 977 additions and 21 deletions.
9 changes: 6 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata } from "next";
import { Figtree } from "next/font/google";
import "./globals.css";
import Sidebar from '@/components/Sidebar'
import SupabaseProvider from "@/providers/SupabaseProvider";

const font = Figtree({
subsets: ["latin"],
Expand All @@ -23,9 +24,11 @@ export default function RootLayout({
<body
className={`${font.className} ${font.className} antialiased`}
>
<Sidebar>
{children}
</Sidebar>
<SupabaseProvider>
<Sidebar>
{children}
</Sidebar>
</SupabaseProvider>
</body>
</html>
);
Expand Down
14 changes: 14 additions & 0 deletions hooks/useUser.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { User } from "@supabase/auth-helpers-nextjs"

import { Subscription, UserDetails } from "@/types"
import { createContext } from "react"

type UserContextType = {
accesToken: string | null;
user: User | null;
userDetails: UserDetails | null;
isLoading: boolean;
subsscription: Subscription | null;
};

export const UserContext = createContext<UserContextType | undefined>;
Loading

0 comments on commit 3c9e447

Please sign in to comment.