mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
15 lines
376 B
JavaScript
15 lines
376 B
JavaScript
import { NotionAPI as NotionLibrary } from 'notion-client'
|
|
import BLOG from '@/blog.config'
|
|
|
|
const notionAPI = getNotionAPI()
|
|
|
|
function getNotionAPI() {
|
|
return new NotionLibrary({
|
|
activeUser: BLOG.NOTION_ACTIVE_USER || null,
|
|
authToken: BLOG.NOTION_TOKEN_V2 || null,
|
|
userTimeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
})
|
|
}
|
|
|
|
export default notionAPI
|