this repo has no description
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: fetch boards in layout

TurtlePaw e8552c55 9f426aff

+14 -6
+7 -4
src/app/layout.tsx
··· 6 6 import { AuthProvider } from "@/lib/useAuth"; 7 7 import { ProfileProvider } from "@/lib/useProfile"; 8 8 import { Toaster } from "sonner"; 9 + import { BoardsProvider } from "@/lib/hooks/useBoards"; 9 10 10 11 const geistSans = Geist({ 11 12 variable: "--font-geist-sans", ··· 36 37 <ThemeProvider attribute="class" defaultTheme="system" enableSystem> 37 38 <AuthProvider> 38 39 <ProfileProvider> 39 - <div className="min-h-screen flex flex-col"> 40 - <Navbar /> 41 - <main className="flex-1 py-6">{children}</main> 42 - </div> 40 + <BoardsProvider> 41 + <div className="min-h-screen flex flex-col"> 42 + <Navbar /> 43 + <main className="flex-1 py-6">{children}</main> 44 + </div> 45 + </BoardsProvider> 43 46 </ProfileProvider> 44 47 </AuthProvider> 45 48 </ThemeProvider>
-1
src/app/page.tsx
··· 18 18 const { isLoading } = useFeeds(); 19 19 const { feeds, defaultFeed, setDefaultFeed } = useFeedDefsStore(); 20 20 const { session } = useAuth(); 21 - useBoards(); 22 21 const sentinelRef = useRef<HTMLDivElement>(null); 23 22 const [feed, setFeed] = useState<"timeline" | string>( 24 23 defaultFeed ?? "timeline"
+7 -1
src/lib/hooks/useBoards.tsx
··· 1 - import { useEffect, useState } from "react"; 1 + "use client"; 2 + import { PropsWithChildren, useEffect, useState } from "react"; 2 3 import { useAuth } from "@/lib/useAuth"; 3 4 import { useFeedDefsStore } from "../stores/feedDefs"; 4 5 import { AtUri } from "@atproto/api"; ··· 34 35 35 36 return { isLoading }; 36 37 } 38 + 39 + export function BoardsProvider({ children }: PropsWithChildren) { 40 + useBoards(); 41 + return children; 42 + }