File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
react-notion-x/src/third-party Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ export async function getAllPagesInSpace(
108108 page . collection_query
109109 ) ) {
110110 for ( const collectionData of Object . values ( collectionViews ) ) {
111- const { blockIds } = collectionData
112-
111+ const { blockIds } =
112+ collectionData ?. collection_group_results || { }
113113 if ( blockIds ) {
114114 for ( const collectionItemId of blockIds ) {
115115 void processPage ( collectionItemId , depth + 1 )
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function getCollectionGroups(
3434 }
3535
3636 // TODO: review dates format based on value.type ('week'|'month'|'year')
37- queryValue = format ( new Date ( queryLabel ) , 'MMM d, YYY hh:mm aa' )
37+ queryValue = format ( new Date ( queryLabel ) , 'MMM d, yyyy hh:mm aa' )
3838 }
3939
4040 return {
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ function evalFunctionFormula(
300300
301301 case 'object' :
302302 if ( value instanceof Date ) {
303- return format ( value as Date , 'MMM d, YYY ' )
303+ return format ( value as Date , 'MMM d, yyyy ' )
304304 } else {
305305 // shouldn't ever get here
306306 return `${ value } `
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export function PropertyImpl(props: IPropertyProps) {
9292 }
9393
9494 if ( content instanceof Date ) {
95- content = format ( content , 'MMM d, YYY hh:mm aa' )
95+ content = format ( content , 'MMM d, yyyy hh:mm aa' )
9696 }
9797 } catch {
9898 // console.log('error evaluating formula', schema.formula, err)
@@ -437,15 +437,15 @@ export function PropertyImpl(props: IPropertyProps) {
437437 const renderCreatedTimeValue = React . useMemo (
438438 ( ) =>
439439 function CreatedTimeProperty ( ) {
440- return format ( new Date ( block ! . created_time ) , 'MMM d, YYY hh:mm aa' )
440+ return format ( new Date ( block ! . created_time ) , 'MMM d, yyyy hh:mm aa' )
441441 } ,
442442 [ block ]
443443 )
444444
445445 const renderLastEditedTimeValue = React . useMemo (
446446 ( ) =>
447447 function LastEditedTimeProperty ( ) {
448- return format ( new Date ( block ! . last_edited_time ) , 'MMM d, YYY hh:mm aa' )
448+ return format ( new Date ( block ! . last_edited_time ) , 'MMM d, yyyy hh:mm aa' )
449449 } ,
450450 [ block ]
451451 )
You can’t perform that action at this time.
0 commit comments