Files
NotionNext/pages/archive/index.js
2022-02-28 14:37:27 +08:00

26 lines
540 B
JavaScript

import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { LayoutArchive } from '@/themes'
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
}
}
const ArchiveIndex = (props) => {
return <LayoutArchive {...props}/>
}
export default ArchiveIndex