File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
apps/site/app/blog/[[...slug]] Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ function BlogListing() {
6161
6262 { post . data . tags && post . data . tags . length > 0 && (
6363 < div className = "flex flex-wrap gap-2" >
64- { post . data . tags . map ( ( tag : string ) => (
64+ { post . data . tags . map ( ( tag ) => (
6565 < span
6666 key = { tag }
6767 className = "inline-flex items-center rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary"
@@ -86,7 +86,9 @@ function BlogListing() {
8686}
8787
8888// Blog post component
89- function BlogPost ( { page } : { page : any } ) {
89+ function BlogPost ( { page } : { page : ReturnType < typeof blogSource . getPage > } ) {
90+ if ( ! page ) return null ;
91+
9092 const MDX = page . data . body ;
9193
9294 return (
@@ -140,7 +142,7 @@ function BlogPost({ page }: { page: any }) {
140142
141143 { page . data . tags && page . data . tags . length > 0 && (
142144 < div className = "flex flex-wrap gap-2 mt-4" >
143- { page . data . tags . map ( ( tag : string ) => (
145+ { page . data . tags . map ( ( tag ) => (
144146 < span
145147 key = { tag }
146148 className = "inline-flex items-center rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary"
@@ -233,4 +235,3 @@ export function generateMetadata({ params }: { params: { slug?: string[] } }): M
233235 description : page . data . description ,
234236 } ;
235237}
236-
You can’t perform that action at this time.
0 commit comments