MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / Providers

Function Providers

webapp/src/components/Providers.tsx:11–39  ·  view source on GitHub ↗
({children}: {children: ReactNode})

Source from the content-addressed store, hash-verified

9import {handleError} from "@/lib/util";
10
11export default function Providers({children}: {children: ReactNode}) {
12 const router = useRouter();
13 const setTags = useTagStore((state) => state.setTags);
14
15 useEffect(() => {
16 const loadTags = async () => {
17 const {data: tags, error} = await getTags();
18 if (error) handleError(error);
19 if (tags) setTags(tags);
20 };
21
22 void loadTags();
23 }, [setTags]);
24
25 return (
26 <HeroUIProvider navigate={router.push} className='h-full flex flex-col'>
27 <ToastProvider />
28 <ThemeProvider
29 attribute='class'
30 defaultTheme='light'
31 disableTransitionOnChange={true}
32 enableSystem={false}
33 storageKey='theme'
34 >
35 {children}
36 </ThemeProvider>
37 </HeroUIProvider>
38 );
39}

Callers

nothing calls this directly

Calls 1

loadTagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…