mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 03:54:28 +08:00
24ed2cf364
* fix: site document title rerender after dumi prerender * fix: comment & index page listener render * fix: define seperate layour for index page & seperate Helmet title + desc definition --------- Co-authored-by: afc163 <afc163@gmail.com>
22 lines
589 B
TypeScript
22 lines
589 B
TypeScript
import { Helmet } from 'dumi';
|
|
import type { PropsWithChildren } from 'react';
|
|
import React from 'react';
|
|
import Footer from '../../slots/Footer';
|
|
|
|
const IndexLayout: React.FC<PropsWithChildren<{ title: string; desc: string }>> = ({
|
|
children,
|
|
...restProps
|
|
}) => (
|
|
<>
|
|
<Helmet>
|
|
<title>{restProps.title}</title>
|
|
<meta property="og:title" content={restProps.title} />
|
|
{restProps.desc && <meta name="description" content={restProps.desc} />}
|
|
</Helmet>
|
|
<div style={{ minHeight: '100vh' }}>{children}</div>
|
|
<Footer />
|
|
</>
|
|
);
|
|
|
|
export default IndexLayout;
|