28 lines
916 B
TypeScript
28 lines
916 B
TypeScript
import { Metadata } from 'next';
|
|
import React, { PropsWithChildren, ReactNode, Suspense } from 'react';
|
|
|
|
import { Header } from '../_components/header';
|
|
import { PageSkeleton } from '../_components/loading/page';
|
|
import { Toast, ToastProvider } from '../_components/ui/toast';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'about rext blog',
|
|
description:
|
|
'个人博客,提供一些ts、react、node.js、php、golang相关的技术文档以及分享一些生活琐事',
|
|
keywords: 'react, next.js, web application',
|
|
};
|
|
|
|
const appLayout: React.FC<PropsWithChildren & { modal: ReactNode }> = ({ children, modal }) => (
|
|
<>
|
|
<div className=" tw-app-layout">
|
|
<Header />
|
|
<Suspense fallback={<PageSkeleton />}>{children}</Suspense>
|
|
</div>
|
|
{modal}
|
|
<ToastProvider>
|
|
<Toast />
|
|
</ToastProvider>
|
|
</>
|
|
);
|
|
export default appLayout;
|