2023-04-20 05:46:35 -05:00
|
|
|
import Navbar from 'components/layout/navbar';
|
2023-04-17 23:00:47 -04:00
|
|
|
import { Inter } from 'next/font/google';
|
|
|
|
import { ReactNode, Suspense } from 'react';
|
|
|
|
import './globals.css';
|
|
|
|
|
2023-04-20 05:46:35 -05:00
|
|
|
const { TWITTER_CREATOR, TWITTER_SITE, SITE_NAME } = process.env;
|
2023-04-17 23:00:47 -04:00
|
|
|
|
|
|
|
export const metadata = {
|
|
|
|
title: {
|
|
|
|
default: SITE_NAME,
|
|
|
|
template: `%s | ${SITE_NAME}`
|
|
|
|
},
|
|
|
|
robots: {
|
|
|
|
follow: true,
|
|
|
|
index: true
|
|
|
|
},
|
2023-04-20 05:46:35 -05:00
|
|
|
...(TWITTER_CREATOR &&
|
|
|
|
TWITTER_SITE && {
|
|
|
|
twitter: {
|
|
|
|
card: 'summary_large_image',
|
|
|
|
creator: TWITTER_CREATOR,
|
|
|
|
site: TWITTER_SITE
|
|
|
|
}
|
|
|
|
})
|
2023-04-17 23:00:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
const inter = Inter({
|
|
|
|
subsets: ['latin'],
|
|
|
|
display: 'swap',
|
|
|
|
variable: '--font-inter'
|
|
|
|
});
|
|
|
|
|
|
|
|
export default async function RootLayout({ children }: { children: ReactNode }) {
|
|
|
|
return (
|
|
|
|
<html lang="en" className={inter.variable}>
|
|
|
|
<body className="bg-white text-black selection:bg-teal-300 dark:bg-black dark:text-white dark:selection:bg-fuchsia-600 dark:selection:text-white">
|
|
|
|
<Navbar />
|
|
|
|
<Suspense>
|
|
|
|
<main>{children}</main>
|
|
|
|
</Suspense>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
);
|
|
|
|
}
|