File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -130,9 +130,15 @@ export default function PostLayout({
130
130
< aside className = "hidden float-right ml-2 xl:inline-block" >
131
131
{ recents ( ) }
132
132
</ aside >
133
+ < section className = "guests" >
134
+ { post ?. guestBlocks && renderBlocks ( post . guestBlocks ) }
135
+ </ section >
133
136
< section className = "content" >
134
137
{ post ?. blocks && renderBlocks ( post . blocks ) }
135
138
</ section >
139
+ < section className = "picks" >
140
+ { post ?. pickBlocks && renderBlocks ( post . pickBlocks ) }
141
+ </ section >
136
142
</ article >
137
143
</ div >
138
144
< div className = "inline-block w-full xl:ml-2 xl:hidden" > { recents ( ) } </ div >
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ export interface Post {
24
24
category ?: string [ ] | null ; //If null this will be auto assigned 'Unassigned'
25
25
tag ?: string [ ] | null ;
26
26
format ?: PostFormat ; //If null this will be auto assigned 'standard'
27
+ guestBlocks ?: NotionBlock [ ] ;
27
28
blocks ?: NotionBlock [ ] ;
29
+ pickBlocks ?: NotionBlock [ ] ;
28
30
slug : string ;
29
31
historyId ?: string ;
30
32
postId ?: string ;
Original file line number Diff line number Diff line change @@ -818,11 +818,14 @@ export const getPurrfectStreamPageBlocks = async ({
818
818
queryPurrfectGuestsByStreamId ( id ) ,
819
819
] ) ;
820
820
821
+ let guestBlocks : NotionBlock [ ] = [ ] ;
821
822
let blocks : NotionBlock [ ] = [ ] ;
823
+ let pickBlocks : NotionBlock [ ] = [ ] ;
824
+
822
825
// Build the markdown for page
823
826
for ( const guest of purrfectGuests . results ) {
824
827
const b = await getBlocks ( guest . id ) ;
825
- blocks = [ ...blocks , ...b ] ;
828
+ guestBlocks = [ ...guestBlocks , ...b ] ;
826
829
}
827
830
for ( const page of raw . results ) {
828
831
blocks = [ ...blocks , ...( await getChildBlocks ( await getBlocks ( page . id ) ) ) ] ;
@@ -866,7 +869,6 @@ export const getPurrfectStreamPageBlocks = async ({
866
869
picks = [ ...picks , guest ] as any ;
867
870
}
868
871
}
869
- let pickBlocks : any [ ] = [ ] ;
870
872
if ( picks . length > 0 ) {
871
873
pickBlocks = [
872
874
formatBlock ( { type : 'heading_2' , content : 'Purrfect Picks' } ) ,
@@ -888,11 +890,12 @@ export const getPurrfectStreamPageBlocks = async ({
888
890
} ) ;
889
891
} ) ;
890
892
}
891
- blocks = [ ...blocks , ...pickBlocks ] ;
892
893
893
894
return {
894
895
...raw . results [ 0 ] ,
896
+ guestBlocks,
895
897
blocks,
898
+ pickBlocks,
896
899
} ;
897
900
} ;
898
901
You can’t perform that action at this time.
0 commit comments