2023-06-27 00:28:54 +00:00
|
|
|
import { ChakraProvider } from '@chakra-ui/react'
|
|
|
|
// import type { MetaFunction } from "@vercel/remix"
|
2023-06-23 03:59:14 +00:00
|
|
|
import {
|
|
|
|
Links,
|
|
|
|
LiveReload,
|
|
|
|
Meta,
|
|
|
|
Outlet,
|
|
|
|
Scripts,
|
2023-06-27 00:28:54 +00:00
|
|
|
ScrollRestoration
|
|
|
|
} from '@remix-run/react'
|
|
|
|
import { Analytics } from '@vercel/analytics/react'
|
2023-06-28 01:12:17 +00:00
|
|
|
import { Main } from './components/Layout/Main'
|
2023-06-23 03:59:14 +00:00
|
|
|
|
2023-06-27 00:28:54 +00:00
|
|
|
function Document ({
|
2023-06-26 12:08:05 +00:00
|
|
|
children,
|
2023-06-27 01:32:30 +00:00
|
|
|
title = 'Thingtime'
|
2023-06-26 12:08:05 +00:00
|
|
|
}: {
|
|
|
|
children: React.ReactNode
|
|
|
|
title?: string
|
|
|
|
}) {
|
2023-06-23 03:59:14 +00:00
|
|
|
return (
|
2023-06-27 00:28:54 +00:00
|
|
|
<html lang='en'>
|
2023-06-23 03:59:14 +00:00
|
|
|
<head>
|
2023-06-27 01:44:00 +00:00
|
|
|
<meta charSet='utf-8' />
|
|
|
|
<meta name='viewport' content='width=device-width,initial-scale=1' />
|
2023-06-23 03:59:14 +00:00
|
|
|
<Meta />
|
2023-06-26 12:08:05 +00:00
|
|
|
<title>{title}</title>
|
2023-06-23 03:59:14 +00:00
|
|
|
<Links />
|
|
|
|
</head>
|
|
|
|
<body>
|
2023-06-28 01:12:17 +00:00
|
|
|
<Main>{children}</Main>
|
2023-06-23 03:59:14 +00:00
|
|
|
<ScrollRestoration />
|
|
|
|
<Scripts />
|
2023-06-26 12:08:05 +00:00
|
|
|
<LiveReload />
|
2023-06-23 03:59:14 +00:00
|
|
|
<Analytics />
|
|
|
|
</body>
|
|
|
|
</html>
|
2023-06-26 12:08:05 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2023-06-27 00:28:54 +00:00
|
|
|
export default function App () {
|
2023-06-26 12:08:05 +00:00
|
|
|
return (
|
|
|
|
<Document>
|
|
|
|
<ChakraProvider>
|
|
|
|
<Outlet />
|
|
|
|
</ChakraProvider>
|
|
|
|
</Document>
|
|
|
|
)
|
2023-06-23 03:59:14 +00:00
|
|
|
}
|
2023-06-29 11:06:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
// limiter
|
|
|
|
try {
|
|
|
|
window.thingtime = {
|
|
|
|
tmp: {},
|
|
|
|
things: {
|
|
|
|
limit: 999,
|
|
|
|
count: 0,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (err) {
|
|
|
|
// will error on server
|
|
|
|
}
|