This commit is contained in:
David Nguyen
2025-02-05 23:37:21 +11:00
parent 9c7910a070
commit 7effe66387
26 changed files with 1518 additions and 1951 deletions

View File

@ -3,17 +3,17 @@
@font-face {
font-family: 'Inter';
src: url('/public/fonts/inter-regular.ttf') format('ttf');
font-weight: 400;
/* font-weight: 400;
font-style: normal;
font-display: swap;
font-display: swap; */
}
@font-face {
font-family: 'Caveat';
src: url('/public/fonts/caveat.ttf') format('ttf');
font-weight: 400;
/* font-weight: 400;
font-style: normal;
font-display: swap;
font-display: swap; */
}
@layer base {

View File

@ -162,6 +162,8 @@ export default function App({ loaderData }: Route.ComponentProps) {
}
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
console.error('[RootErrorBoundary]', error);
const errorCode = isRouteErrorResponse(error) ? error.status : 500;
return <GenericErrorLayout errorCode={errorCode} />;

View File

@ -18,13 +18,15 @@ export const loader = async ({ request, context }: Route.LoaderArgs) => {
throw redirect('/signin');
}
const banner = await getSiteSettings().then((settings) =>
settings.find((setting) => setting.id === SITE_SETTINGS_BANNER_ID),
);
const requestHeaders = Object.fromEntries(request.headers.entries());
const limits = await getLimits({ headers: requestHeaders, teamId: session.currentTeam?.id });
// Todo: Should only load this on first render.
const [limits, banner] = await Promise.all([
getLimits({ headers: requestHeaders, teamId: session.currentTeam?.id }),
getSiteSettings().then((settings) =>
settings.find((setting) => setting.id === SITE_SETTINGS_BANNER_ID),
),
]);
return {
user: session.user,