mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 07:26:50 +00:00
debug-panel , fix sth
This commit is contained in:
@@ -37,7 +37,9 @@ export function GlobalContextProvider({ children }) {
|
||||
function switchTheme() {
|
||||
const currentIndex = ALL_THEME.indexOf(theme)
|
||||
const newIndex = currentIndex < ALL_THEME.length - 1 ? currentIndex + 1 : 0
|
||||
changeTheme(ALL_THEME[newIndex])
|
||||
const newTheme = ALL_THEME[newIndex]
|
||||
changeTheme(newTheme)
|
||||
return newTheme
|
||||
}
|
||||
|
||||
function changeTheme(theme) {
|
||||
|
||||
@@ -236,8 +236,8 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) {
|
||||
})
|
||||
}
|
||||
|
||||
const categoryOptions = getAllCategories({ allPages, categoryOptions: getCategoryOptions(schema), sliceCount: BLOG.PREVIEW_CATEGORY_COUNT })
|
||||
const tagOptions = getAllTags({ allPages, sliceCount: BLOG.PREVIEW_TAG_COUNT, tagOptions: getTagOptions(schema) })
|
||||
const categoryOptions = getAllCategories({ allPages, categoryOptions: getCategoryOptions(schema) })
|
||||
const tagOptions = getAllTags({ allPages, tagOptions: getTagOptions(schema) })
|
||||
const siteInfo = getBlogInfo({ collection, block })
|
||||
const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') })
|
||||
const latestPosts = getLatestPosts({ allPages, from, latestPostCount: 5 })
|
||||
|
||||
Reference in New Issue
Block a user