import { Links, Meta, Outlet, Scripts, ScrollRestoration, useLoaderData } from '@remix-run/react'; import './tailwind.css'; import clsx from 'clsx'; import { PreventFlashOnWrongTheme, ThemeProvider, useTheme } from 'remix-themes'; import { LoaderFunctionArgs } from '@remix-run/node'; import { themeSessionResolver } from './sessions.server'; export async function loader({ request }: LoaderFunctionArgs) { const { getTheme } = await themeSessionResolver(request); return { theme: getTheme() }; } // export function Layout({ children }: { children: React.ReactNode }) { // return ( // // // // // // // // // {children} // // // // // ); // } export default function AppWithProviders() { const data = useLoaderData(); return ( ); } export function App() { const data = useLoaderData(); const [theme] = useTheme(); return ( {/* */} ); }