MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / AppWithProviders

Function AppWithProviders

app/root.tsx:103–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103export default function AppWithProviders() {
104 const { theme, starCount, themeOverride } = useLoaderData<LoaderData>();
105
106 const location = useLocation();
107
108 // Force dark mode on the homepage
109 const forceDarkMode = location.pathname === "/";
110
111 return (
112 <ThemeProvider
113 specifiedTheme={theme}
114 themeOverride={forceDarkMode ? "dark" : themeOverride}
115 >
116 <PreferencesProvider>
117 <StarCountProvider starCount={starCount}>
118 <App />
119 </StarCountProvider>
120 </PreferencesProvider>
121 </ThemeProvider>
122 );
123}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected