Skip to content

Commit 3c1fad5

Browse files
🈯
1 parent 40fc827 commit 3c1fad5

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

components/NotionPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ const propertyDateValue = (
8787
) => {
8888
if (pageHeader && schema?.name?.toLowerCase() === 'published') {
8989
const publishDate = data?.[0]?.[1]?.[0]?.[1]?.start_date
90-
console.log('date', { data, publishDate })
9190

9291
if (publishDate) {
9392
return `Published ${formatDate(publishDate, {

lib/get-all-pages.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ export async function getAllPagesImpl(
3434
})
3535

3636
if (map[canonicalPageId]) {
37-
console.error(
38-
'error duplicate canonical page id',
37+
console.warn('error duplicate canonical page id', {
3938
canonicalPageId,
4039
pageId,
41-
map[canonicalPageId]
42-
)
43-
44-
return map
40+
existingPageId: map[canonicalPageId]
41+
})
4542
} else {
4643
return {
4744
...map,

lib/notion.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,12 @@ export async function getPage(pageId: string): Promise<ExtendedRecordMap> {
4848
// the page title, slug, etc.
4949
const navigationLinkRecordMaps = await getNavigationLinkPages()
5050

51-
const preLength = Object.keys(recordMap.block).length
5251
if (navigationLinkRecordMaps?.length) {
5352
recordMap = navigationLinkRecordMaps.reduce(
5453
(map, navigationLinkRecordMap) =>
5554
mergeRecordMaps(map, navigationLinkRecordMap),
5655
recordMap
5756
)
58-
59-
const postLength = Object.keys(recordMap.block).length
60-
61-
console.log('BLOCKS', { preLength, postLength })
6257
}
6358
}
6459

0 commit comments

Comments
 (0)