Files
Frontend/src/app/layout.tsx

64 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-04-15 09:13:52 +01:00
import { Metadata, Viewport } from "next";
2024-04-17 18:33:45 +01:00
import Script from "next/script";
2024-04-18 03:51:41 +01:00
import { ReactElement } from "react";
2024-04-16 22:03:48 +01:00
import Container from "./components/container";
import ThemeProvider from "./components/theme-provider";
import { Toaster } from "./components/ui/toaster";
2024-04-17 18:08:13 +01:00
import { TooltipProvider } from "./components/ui/tooltip";
2024-04-14 17:45:04 +01:00
2024-04-19 15:22:03 +01:00
import "./globals.css";
import config from "@root/config.json";
import { inter } from "@/app/font/fonts";
2024-04-19 15:22:03 +01:00
2024-04-15 09:13:52 +01:00
export const viewport: Viewport = {
themeColor: "#3498DB",
};
export const metadata: Metadata = {
2024-04-19 23:13:14 +01:00
metadataBase: new URL(config.publicUrl),
2024-04-15 09:13:52 +01:00
title: {
2024-04-19 23:13:14 +01:00
template: "%s - " + config.name,
default: config.name,
2024-04-15 09:13:52 +01:00
},
2024-04-19 23:13:14 +01:00
description: config.description,
2024-04-15 09:13:52 +01:00
keywords: "Minecraft, APIs, wrapper, utility, development",
openGraph: {
2024-04-19 23:13:14 +01:00
title: config.name,
description: config.description,
url: config.publicUrl,
2024-04-15 09:13:52 +01:00
locale: "en_US",
type: "website",
2024-04-17 17:46:41 +01:00
images: [
{
2024-04-19 23:13:14 +01:00
url: `${config.publicUrl}/media/logo.png`,
2024-04-17 17:46:41 +01:00
},
],
},
twitter: {
card: "summary",
2024-04-15 09:13:52 +01:00
},
};
2024-04-14 17:45:04 +01:00
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
2024-04-18 03:51:41 +01:00
}>): ReactElement {
2024-04-14 17:45:04 +01:00
return (
2024-04-14 18:46:37 +01:00
<>
2024-04-17 18:33:45 +01:00
<Script defer data-domain="mcutils.xyz" src="https://analytics.fascinated.cc/js/script.js" />
<html className={inter.className} lang="en" suppressHydrationWarning>
2024-04-14 18:46:37 +01:00
<head />
<body>
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
2024-04-17 18:08:13 +01:00
<TooltipProvider>
<Toaster />
2024-04-17 18:08:13 +01:00
<Container>{children}</Container>
</TooltipProvider>
2024-04-14 18:46:37 +01:00
</ThemeProvider>
</body>
</html>
</>
2024-04-14 17:45:04 +01:00
);
}