Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit aa45b8e

Browse files
committed
no need to pass props into <Meta />
1 parent 0527822 commit aa45b8e

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

components/common/Layout.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1+
import Meta from '@/components/common/Meta'
2+
import Footer from '@/components/organisms/Footer'
3+
import Header from '@/components/organisms/Header'
14
import PropTypes from 'prop-types'
2-
import Meta from './Meta'
3-
import Header from '../organisms/Header'
4-
import Footer from '../organisms/Footer'
5-
import config from '@/functions/config'
65

7-
export default function Layout({children, ...props}) {
6+
export default function Layout({children}) {
87
return (
98
<>
10-
<Meta title={props.title} description={props.description} />
9+
<Meta />
1110
<Header />
1211
<main>{children}</main>
1312
<Footer />
1413
</>
1514
)
1615
}
1716

18-
Layout.defaultProps = {
19-
description: config.siteDescription,
20-
title: config.siteName
21-
}
22-
2317
Layout.propTypes = {
24-
children: PropTypes.object.isRequired,
25-
description: PropTypes.string,
26-
title: PropTypes.string
18+
children: PropTypes.any.isRequired
2719
}

0 commit comments

Comments
 (0)