Files
NotionNext/pages/search.js
2022-02-26 21:23:59 +08:00

29 lines
541 B
JavaScript

import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutSearch } from '@/themes'
export async function getStaticProps () {
const {
allPosts,
categories,
tags,
postCount,
latestPosts
} = await getGlobalNotionData({ from: 'search-props', pageType: ['Post'] })
return {
props: {
posts: allPosts,
tags,
categories,
postCount,
latestPosts
},
revalidate: 1
}
}
const Search = (props) => {
return <LayoutSearch {...props} />
}
export default Search