Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KlonD90 committed Nov 13, 2024
1 parent 6ba74da commit 61afa80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions site/src/components/pages/CommongPage/CommonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ type ArrowButtonProps = {

type CommonPageProps = {
page: {
title: string,
content: string,
},
title: string
content: string
}
content: {
joinNil: JoinNilBaseData
}
Expand Down
9 changes: 3 additions & 6 deletions site/src/pages/pages/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ import { REVALIDATE } from 'constants/common'

import { postPage } from 'stubs/postPageData'
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import { Page } from '../../../../admin/src/api/page/content-types/page/page';
import { Page } from '../../../../admin/src/api/page/content-types/page/page'
import CommonPage from 'pages/CommongPage/CommonPage'

const Post = ({ data, content }: InferGetStaticPropsType<typeof getStaticProps>) => (
<MetaLayout seo={{ title: data.title }}>
<CommonPage page={data} content={content} />
<CommonPage page={data} content={content} />
</MetaLayout>
)

export async function getStaticProps({ params }: GetStaticPropsContext<{ slug: string }>) {
const slug = params?.slug ?? ''
const [article, config] = await Promise.all([
getCommonPageBySlug(slug),
getSiteConfig(),
])
const [article, config] = await Promise.all([getCommonPageBySlug(slug), getSiteConfig()])

if (!article) {
return {
Expand Down

0 comments on commit 61afa80

Please sign in to comment.