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

Function getThemeFromRequest

app/root.tsx:73–80  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

71};
72
73function getThemeFromRequest(request: Request): Theme | undefined {
74 const url = new URL(request.url);
75 const theme = url.searchParams.get("theme");
76 if (theme) {
77 return theme as Theme;
78 }
79 return undefined;
80}
81
82function App() {
83 const [theme] = useTheme();

Callers 1

loaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected