Skip to content

Commit a553d4f

Browse files
committed
added seo fix
1 parent b418cb2 commit a553d4f

File tree

8 files changed

+46
-22
lines changed

8 files changed

+46
-22
lines changed

components/Header.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/Layout.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import NavBar from '@components/NavBar'
2+
import Footer from '@components/footer/Footer'
3+
import { Box } from '@chakra-ui/react'
4+
5+
const Layout = ({ children }: { children: React.ReactNode }) => {
6+
return (
7+
<>
8+
<NavBar />
9+
<Box
10+
p="1.25em"
11+
px="5%"
12+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
13+
as="main"
14+
>
15+
{children}
16+
</Box>
17+
<Footer />
18+
</>
19+
)
20+
}
21+
22+
export default Layout

components/NavBar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ import { PomodoroTimer } from '@components/PomodoroTimer'
1919
function NavBar() {
2020
const router = useRouter()
2121
return (
22-
<Box>
22+
<Box
23+
p="1.25em"
24+
px="5%"
25+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
26+
as="header"
27+
>
2328
<Flex justify="left" alignItems="center">
2429
<Link as={NextLink} variant="logo" href={'/'}>
2530
{router.pathname.endsWith('/[slug]') ? (

components/PageSeoLayout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ const PageSeoLayout = ({
4040
href: '/favicon/favicon.ico',
4141
},
4242
]}
43-
>
44-
{children}
45-
</NextSeo>
43+
/>
44+
{children}
4645
</>
4746
)
4847
}

components/footer/Footer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default function Footer() {
1414
return (
1515
<Box
1616
// bg={useColorModeValue('#00000f', '#1d1e20')}
17+
p="1.25em"
18+
px="5%"
19+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
20+
as="footer"
1721
color={useColorModeValue('gray.700', 'gray.200')}
1822
>
1923
<Container

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"prettier": "^2.8.4",
5454
"react-syntax-highlighter": "^15.5.0",
5555
"remark-frontmatter": "^4.0.1",
56-
"typescript": "4.9.5"
56+
"typescript": "^5.1.6"
5757
},
5858
"lint-staged": {
5959
"*.{js,ts,tsx,md,json,yml}": "prettier --write"

pages/_app.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import { ChakraProvider, Box } from '@chakra-ui/react'
22
import type { AppProps } from 'next/app'
33
import Head from 'next/head'
44
import { theme } from '@theme'
5-
import Header from '@components/Header'
6-
import Footer from '@components/footer/Footer'
5+
import Layout from '@components/Layout'
76
import { MDXProvider } from '@mdx-js/react'
87
import Components from '@components/mdx/Components'
98
import { Analytics } from '@vercel/analytics/react'
9+
import { type NextPage } from 'next'
10+
import { type ReactNode, type ReactElement } from 'react'
1011

1112
function MyApp({ Component, pageProps }: AppProps) {
1213
return (
@@ -40,14 +41,12 @@ function MyApp({ Component, pageProps }: AppProps) {
4041
<meta name="msapplication-TileColor" content="#ffffff" />
4142
<meta name="theme-color" content="#000000" />
4243
</Head>
43-
<Box p="1.25em" px="5%" mx={{ base: '2rem', md: '6rem', lg: '10rem' }}>
44-
<Header />
45-
<MDXProvider components={Components}>
44+
<MDXProvider components={Components}>
45+
<Layout>
4646
<Component {...pageProps} />
47-
</MDXProvider>
48-
<Footer />
47+
</Layout>
4948
<Analytics />
50-
</Box>
49+
</MDXProvider>
5150
</ChakraProvider>
5251
)
5352
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6683,10 +6683,10 @@ typed-array-length@^1.0.4:
66836683
for-each "^0.3.3"
66846684
is-typed-array "^1.1.9"
66856685

6686-
typescript@4.9.5:
6687-
version "4.9.5"
6688-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
6689-
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
6686+
typescript@^5.1.6:
6687+
version "5.1.6"
6688+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274"
6689+
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
66906690

66916691
unbox-primitive@^1.0.2:
66926692
version "1.0.2"

0 commit comments

Comments
 (0)