mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-25 21:13:41 -05:00
* Clean away prisma migrations
* Way to migrate WIP
* SQLite3 seeding script initial
* Fetch tournament data in loader
* CheckinActions new loader data model
* Virtual banner text color columns
* Logged in user
* Count teams
* ownTeam
* Map pool tab fully working
* Teams tab
* Fix timestamp default
* Register page
* Manage team page
* Camel case checkedInTimestamp
* Clean slate
* Add .nvmrc
* Add favicon
* Package lock file version 2
* Update tsconfig
* Add Tailwind
* Add StrictMode
* Add background color
* Auth without DB
* Revert "Add Tailwind"
This reverts commit 204713c602.
* Auth with DB
* Switch back to tilde absolute import
* Import layout
* Camel case for database columns
* Move auth routes to folder
* User popover links working
* Import linters
* User page initial
* User edit page with country
* Script to delete db files before migration in dev
* Remove "youtubeName" column
* Correct avatar size on desktop
* Fix SubNav not spanning the whole page
* Remove duplicate files
* Update README
70 lines
1.7 KiB
TypeScript
70 lines
1.7 KiB
TypeScript
import * as React from "react";
|
|
import type {
|
|
LinksFunction,
|
|
LoaderFunction,
|
|
MetaFunction,
|
|
} from "@remix-run/node";
|
|
import { json } from "@remix-run/node";
|
|
import {
|
|
Links,
|
|
LiveReload,
|
|
Meta,
|
|
Outlet,
|
|
Scripts,
|
|
ScrollRestoration,
|
|
} from "@remix-run/react";
|
|
import { authenticator } from "~/core/authenticator.server";
|
|
import globalStyles from "~/styles/global.css";
|
|
import layoutStyles from "~/styles/layout.css";
|
|
import resetStyles from "~/styles/reset.css";
|
|
import commonStyles from "~/styles/common.css";
|
|
import { Layout } from "./components/layout";
|
|
import type { LoggedInUser } from "./core/DiscordStrategy.server";
|
|
|
|
export const links: LinksFunction = () => {
|
|
return [
|
|
{ rel: "stylesheet", href: resetStyles },
|
|
{ rel: "stylesheet", href: globalStyles },
|
|
{ rel: "stylesheet", href: commonStyles },
|
|
{ rel: "stylesheet", href: layoutStyles },
|
|
];
|
|
};
|
|
|
|
export const meta: MetaFunction = () => ({
|
|
charset: "utf-8",
|
|
title: "sendou.ink",
|
|
viewport: "width=device-width,initial-scale=1",
|
|
});
|
|
|
|
export interface RootLoaderData {
|
|
user?: LoggedInUser;
|
|
}
|
|
|
|
export const loader: LoaderFunction = async ({ request }) => {
|
|
const user = (await authenticator.isAuthenticated(request)) ?? undefined;
|
|
|
|
return json<RootLoaderData>({ user });
|
|
};
|
|
|
|
export default function App() {
|
|
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<Meta />
|
|
<Links />
|
|
</head>
|
|
<body>
|
|
<React.StrictMode>
|
|
<Layout menuOpen={menuOpen} setMenuOpen={setMenuOpen}>
|
|
<Outlet />
|
|
</Layout>
|
|
</React.StrictMode>
|
|
<ScrollRestoration />
|
|
<Scripts />
|
|
<LiveReload />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|