2023-10-07 14:23:52 +08:00
|
|
|
import type { PropsWithChildren } from 'react';
|
|
|
|
import React from 'react';
|
2024-02-04 17:08:39 +08:00
|
|
|
import { Helmet } from 'dumi';
|
|
|
|
|
2023-10-07 14:23:52 +08:00
|
|
|
import Footer from '../../slots/Footer';
|
|
|
|
|
2024-02-04 17:08:39 +08:00
|
|
|
interface IndexLayoutProps {
|
|
|
|
title?: string;
|
|
|
|
desc?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const IndexLayout: React.FC<PropsWithChildren<IndexLayoutProps>> = (props) => {
|
|
|
|
const { children, title, desc } = props;
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Helmet>
|
|
|
|
<title>{title}</title>
|
|
|
|
<meta property="og:title" content={title} />
|
|
|
|
{desc && <meta name="description" content={desc} />}
|
|
|
|
</Helmet>
|
|
|
|
<div style={{ minHeight: '100vh' }}>{children}</div>
|
|
|
|
<Footer />
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
2023-10-07 14:23:52 +08:00
|
|
|
|
|
|
|
export default IndexLayout;
|