Archived
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import Head from 'next/head';
|
|
import React, { ReactNode } from 'react';
|
|
import Footer from './Footer';
|
|
import Header from './Header';
|
|
import { Analytics } from "@vercel/analytics/react"
|
|
import { SpeedInsights } from "@vercel/speed-insights/next"
|
|
|
|
interface LayoutProps {
|
|
children: ReactNode;
|
|
title?: string;
|
|
description?: string;
|
|
}
|
|
|
|
const Layout: React.FC<LayoutProps> = ({
|
|
children,
|
|
title = 'Confessions of Grace',
|
|
description = 'A blog dedicated to exploring the doctrines of grace and Reformed theology.'
|
|
}) => {
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>{title}</title>
|
|
<meta name="description" content={description} />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</Head>
|
|
<div className="flex flex-col min-h-screen">
|
|
<Header />
|
|
<main className="flex-grow container mx-auto px-4 py-8">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
<Analytics />
|
|
<SpeedInsights/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Layout; |