Files
NotionNext/pages/archive/index.js
2022-03-03 21:28:08 +08:00

27 lines
598 B
JavaScript

import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { useGlobal } from '@/lib/global'
const ArchiveIndex = (props) => {
const { ThemeComponents } = useGlobal()
return <ThemeComponents.LayoutArchive {...props}/>
}
export async function getStaticProps () {
const { allPosts, categories, tags, postCount, customNav } =
await getGlobalNotionData({ from: 'archive-index' })
return {
props: {
posts: allPosts,
tags,
categories,
postCount,
customNav
},
revalidate: 1
}
}
export default ArchiveIndex