| 1 | import type { Metadata } from "next"; |
| 2 | import { Funnel_Display, Geist |
| 3 | import { getLocale, getMessages |
| 4 | |
| 5 | import "../index.css"; |
| 6 | import Providers from "@/components/providers |
| 7 | import { getInstanceSettings } |
| 8 | |
| 9 | const funnelDisplay = Funnel_Display |
| 10 | variable: "--font-funnel-display", |
| 11 | fallback: [], |
| 12 | subsets: ["latin"], |
| 13 | weight: ["400", |
| 14 | }); |
| 15 | |
| 16 | const geistSans = Geist |
| 17 | variable: "--font-geist-sans", |
| 18 | subsets: ["latin"], |
| 19 | }); |
| 20 | |
| 21 | const geistMono = Geist_Mono |
| 22 | variable: "--font-geist-mono", |
| 23 | fallback: [], |
| 24 | subsets: ["latin"], |
| 25 | }); |
| 26 | |
| 27 | export async function generateMetadata |
| 28 | const { |
| 29 | appName, metaDescription, |
| 30 | ogTitle, ogDescription, |
| 31 | twitterCard, twitterSite, |
| 32 | themeColor, metaKeywords, |
| 33 | } = await getInstanceSettings |
| 34 | |
| 35 | const resolvedTitle = |
| 36 | const resolvedDesc = |
| 37 | |
| 38 | return { |
| 39 | title: appName, |
| 40 | description: resolvedDesc, |
| 41 | ...(metaKeywords ? |
| 42 | ...(themeColor ? |
| 43 | icons: { icon: logoUrl |
| 44 | openGraph: { |
| 45 | title: resolvedTitle, |
| 46 | description: resolvedDesc, |
| 47 | siteName: ogSiteName || |
| 48 | type: (ogType as |
| 49 | ...(ogBannerUrl ? |
| 50 | }, |
| 51 | twitter: { |
| 52 | card: (twitterCard as |
| 53 | ...(twitterSite ? |
| 54 | ...(twitterCreator ? |
| 55 | title: resolvedTitle, |
| 56 | description: resolvedDesc, |
| 57 | ...(ogBannerUrl ? |
| 58 | }, |
| 59 | }; |
| 60 | } |
| 61 | |
| 62 | export default async function |
| 63 | children, |
| 64 | }: Readonly< |
| 65 | children: React |
| 66 | }>) { |
| 67 | const locale = |
| 68 | const messages = |
| 69 | |
| 70 | return ( |
| 71 | <html lang={locale |
| 72 | <body className={` |
| 73 | <Providers locale={ |
| 74 | {children} |
| 75 | </Providers> |
| 76 | </body> |
| 77 | </html> |
| 78 | ); |
| 79 | } |