Skip to content

Commit 4fb2abb

Browse files
committed
fix: loaders and build
1 parent 5b7449f commit 4fb2abb

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/docs/app/root.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData } from 'react-router'
1+
import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration } from 'react-router'
22

33
import type { Route } from './+types/root'
44
import appInlineCss from './app.css?inline'
@@ -30,15 +30,8 @@ export const links: Route.LinksFunction = () => [
3030
},
3131
]
3232

33-
export async function loader() {
34-
return {
35-
isDev: import.meta.env.DEV,
36-
}
37-
}
38-
3933
export function Layout({ children }: { children: React.ReactNode }) {
40-
const data = useRouteLoaderData<typeof loader>('root')
41-
const useReactScan = data?.isDev === true
34+
const useReactScan = import.meta?.env?.DEV === true
4235
return (
4336
<html lang="en">
4437
<head>

0 commit comments

Comments
 (0)