echoes/frontend/app/root.tsx

36 lines
868 B
TypeScript

import { Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react";
import type { LoaderFunction } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { ThemeProvider } from "hooks/themeContext";
import { createContext, useContext, ReactNode } from 'react';
import "./tailwind.css";
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1"
/>
<Meta />
</head>
<body>
<ThemeProvider>
{children}
</ThemeProvider>
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
export default function App() {
return (
<Layout>
<Outlet />
</Layout>
);
}