tailwind-nextjs-blog/components/LayoutWrapper.tsx

29 lines
635 B
TypeScript
Raw Normal View History

2023-08-16 23:55:57 +08:00
import { Inter } from 'next/font/google';
import SectionContainer from './SectionContainer';
import Footer from './Footer';
import { ReactNode } from 'react';
import Header from './Header';
2022-07-17 21:40:41 +08:00
interface Props {
2023-08-16 23:55:57 +08:00
children: ReactNode;
}
const inter = Inter({
subsets: ['latin'],
2023-08-16 23:55:57 +08:00
});
const LayoutWrapper = ({ children }: Props) => {
2022-07-17 21:40:41 +08:00
return (
<SectionContainer>
2023-08-16 23:55:57 +08:00
<div
className={`${inter.className} flex h-screen flex-col justify-between font-sans`}>
<Header />
2022-07-17 21:40:41 +08:00
<main className="mb-auto">{children}</main>
<Footer />
</div>
</SectionContainer>
2023-08-16 23:55:57 +08:00
);
};
2022-07-17 21:40:41 +08:00
2023-08-16 23:55:57 +08:00
export default LayoutWrapper;