Skip to content

Commit

Permalink
fix: fixed circular call
Browse files Browse the repository at this point in the history
  • Loading branch information
yungblud committed Dec 29, 2023
1 parent 536d1c6 commit 661cd0e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/surflog/lib/notion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { cache } from 'react'
import { queryDetail, queryList, retrievePage } from '@coldsurfers/notion-utils'
import {
queryDetail,
queryList,
retrievePage,
getBlocks as getBlocksNotion,
} from '@coldsurfers/notion-utils'

export const revalidate = 3600 // revalidate the data at most every hour

Expand Down Expand Up @@ -28,4 +33,6 @@ export const getPageFromSlug = cache(
})
)

export const getBlocks = cache(async (blockID) => await getBlocks(blockID))
export const getBlocks = cache(
async (blockID) => await getBlocksNotion(blockID)
)

0 comments on commit 661cd0e

Please sign in to comment.