mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
25 lines
574 B
JavaScript
25 lines
574 B
JavaScript
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
|
|
import React from 'react'
|
|
import { LayoutCategoryIndex } from '@/themes'
|
|
|
|
export default function Category (props) {
|
|
return <LayoutCategoryIndex {...props}/>
|
|
}
|
|
|
|
export async function getStaticProps () {
|
|
const from = 'category-index-props'
|
|
const { allPosts, categories, tags, postCount, latestPosts, customNav } = await getGlobalNotionData({ from })
|
|
|
|
return {
|
|
props: {
|
|
tags,
|
|
allPosts,
|
|
categories,
|
|
postCount,
|
|
latestPosts,
|
|
customNav
|
|
},
|
|
revalidate: 1
|
|
}
|
|
}
|