diff options
author | polwex <polwex@sortug.com> | 2025-05-15 04:37:12 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-05-15 04:37:12 +0700 |
commit | df7ffaf4cb722890ca3159c3839c61552f7195d3 (patch) | |
tree | c87b7e5e7556f370cfb8ea5486c36aabcd8c8d3b /src/pages/_layout.tsx |
all working now...
Diffstat (limited to 'src/pages/_layout.tsx')
-rw-r--r-- | src/pages/_layout.tsx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx new file mode 100644 index 0000000..6d227c9 --- /dev/null +++ b/src/pages/_layout.tsx @@ -0,0 +1,39 @@ +import '../styles.css'; + +import type { ReactNode } from 'react'; + +import { Header } from '../components/header'; +import { Footer } from '../components/footer'; + +type RootLayoutProps = { children: ReactNode }; + +export default async function RootLayout({ children }: RootLayoutProps) { + const data = await getData(); + + return ( + <div className="font-['Nunito']"> + <meta name="description" content={data.description} /> + <link rel="icon" type="image/png" href={data.icon} /> + <Header /> + <main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center"> + {children} + </main> + <Footer /> + </div> + ); +} + +const getData = async () => { + const data = { + description: 'An internet website!', + icon: '/images/favicon.png', + }; + + return data; +}; + +export const getConfig = async () => { + return { + render: 'static', + } as const; +}; |