2023-12-18 03:18:17 +00:00
|
|
|
import { LinksFunction, MetaFunction } from "@remix-run/node";
|
|
|
|
import {
|
|
|
|
Links,
|
|
|
|
LiveReload,
|
|
|
|
Meta,
|
|
|
|
Outlet,
|
|
|
|
Scripts,
|
|
|
|
ScrollRestoration,
|
|
|
|
} from "@remix-run/react";
|
|
|
|
import Header from "@/components/LayoutHeader"; // Adjust the import path as needed
|
|
|
|
import Footer from "@/components/LayoutFooter"; // Adjust the import path as needed
|
2023-12-24 01:15:45 +00:00
|
|
|
import "../styles/global.scss";
|
|
|
|
import { cssBundleHref } from "@remix-run/css-bundle"; // Adjust the import path as needed
|
2023-12-18 03:18:17 +00:00
|
|
|
|
2023-12-27 15:18:07 +00:00
|
|
|
import "unfonts.css";
|
2023-12-27 17:35:31 +00:00
|
|
|
import initTracking from "@/lib/analytics.js";
|
|
|
|
import { useEffect } from "react";
|
2023-12-27 15:18:07 +00:00
|
|
|
|
2023-12-18 03:18:17 +00:00
|
|
|
export const links: LinksFunction = () => [
|
2023-12-24 01:15:45 +00:00
|
|
|
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
|
2023-12-18 03:18:17 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
export const meta: MetaFunction = () => [
|
|
|
|
{
|
|
|
|
charset: "utf-8",
|
|
|
|
},
|
|
|
|
{ viewport: "width=device-width,initial-scale=1" },
|
|
|
|
];
|
|
|
|
|
|
|
|
export default function Root() {
|
2023-12-27 17:35:31 +00:00
|
|
|
useEffect(() => {
|
|
|
|
if (process.env.NODE_ENV === "production") {
|
|
|
|
initTracking();
|
|
|
|
}
|
|
|
|
}, []);
|
|
|
|
|
2023-12-18 03:18:17 +00:00
|
|
|
return (
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<Meta />
|
|
|
|
<Links />
|
|
|
|
</head>
|
2023-12-27 15:18:07 +00:00
|
|
|
<body className={`font-main bg-gray-900 flex`}>
|
2023-12-18 03:18:17 +00:00
|
|
|
<main className="dark flex w-full min-h-screen flex-col md:px-40 items-center py-16 mx-auto">
|
|
|
|
<Header />
|
|
|
|
<Outlet />
|
|
|
|
<Footer />
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<ScrollRestoration />
|
|
|
|
<Scripts />
|
|
|
|
<LiveReload />
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
);
|
|
|
|
}
|