Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 2m37s
73 lines
2.3 KiB
TypeScript
73 lines
2.3 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Analytics } from "@vercel/analytics/next";
|
|
import "./globals.css";
|
|
import "./block-theme.css";
|
|
import "./account.css";
|
|
import "./map-theme.css";
|
|
import "./workshop.css";
|
|
import "./leaderboard.css";
|
|
import "./home-map.css";
|
|
import "./rounded-theme.css";
|
|
import "./cursor.css";
|
|
import { SiteCursor } from "@/components/SiteCursor";
|
|
import { I18nProvider } from "@/components/I18nProvider";
|
|
import { getI18n } from "@/lib/i18n";
|
|
import "./polish.css";
|
|
import "./mobile-game.css";
|
|
import "./multiplayer.css";
|
|
import "./support.css";
|
|
import "./appearance.css";
|
|
import "./community.css";
|
|
import "./community-social.css";
|
|
import "./cinematic-intro.css";
|
|
import "./tournaments.css";
|
|
import { themeInitScript } from "@/shared/theme";
|
|
import { SiteSettingsProvider } from "@/components/SiteSettingsProvider";
|
|
import { initialSiteSettings } from "@/lib/site-settings";
|
|
import { rawUser, accountState } from "@/lib/supabase";
|
|
import { LegacyPasswordNotice } from "@/components/LegacyPasswordNotice";
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
const { t } = await getI18n();
|
|
return {
|
|
title: {
|
|
default: t("MineGeo — Get lost in a familiar world"),
|
|
template: "%s · MineGeo",
|
|
},
|
|
description: t(
|
|
"Guess where you are in Minecraft. Explore community servers through 360° panoramas and place your pin on the map.",
|
|
),
|
|
};
|
|
}
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const [{ locale, preference, detectedLocale }, settings, account] =
|
|
await Promise.all([getI18n(), initialSiteSettings(), rawUser()]);
|
|
const active = account
|
|
? (await accountState(account.id)) === "active"
|
|
: false;
|
|
return (
|
|
<html lang={locale} data-theme="dark" suppressHydrationWarning>
|
|
<head>
|
|
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
|
|
</head>
|
|
<body>
|
|
<I18nProvider
|
|
locale={locale}
|
|
preference={preference}
|
|
detectedLocale={detectedLocale}
|
|
>
|
|
<SiteSettingsProvider initialSettings={settings}>
|
|
{children}
|
|
<SiteCursor />
|
|
<LegacyPasswordNotice enabled={active && !!account?.email} />
|
|
</SiteSettingsProvider>
|
|
</I18nProvider>
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|