mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-16 23:16:44 +00:00
feat: add type safety for getStaticProps
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import * as React from 'react'
|
||||
import { GetStaticProps } from 'next'
|
||||
import { isDev, domain } from 'lib/config'
|
||||
import { getSiteMap } from 'lib/get-site-map'
|
||||
import { resolveNotionPage } from 'lib/resolve-notion-page'
|
||||
import { PageProps, Params } from 'lib/types'
|
||||
import { NotionPage } from 'components'
|
||||
|
||||
export const getStaticProps = async (context) => {
|
||||
export const getStaticProps: GetStaticProps<PageProps, Params> = async (context) => {
|
||||
const rawPageId = context.params.pageId as string
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user