mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
29 lines
541 B
JavaScript
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
|