File tree Expand file tree Collapse file tree
pages/_sites/[site]/roadmap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ async function getRoadmapBySlug(
406406
407407 if ( error ) {
408408 console . error ( "Error fetching roadmap by slug:" , error ) ;
409- return { board : null , columns : [ ] , items : [ ] } ;
409+ return { board, columns : [ ] , items : [ ] } ;
410410 }
411411
412412 const { data : columns , error : columnsError } = await supabaseAdmin
@@ -416,7 +416,7 @@ async function getRoadmapBySlug(
416416 . order ( "position" , { ascending : true } ) ;
417417 if ( columnsError ) {
418418 console . error ( "Error fetching roadmap columns:" , columnsError ) ;
419- return { board : null , columns : [ ] , items : [ ] } ;
419+ return { board, columns : [ ] , items : [ ] } ;
420420 }
421421
422422 const { data : items , error : itemsError } = await supabaseAdmin
Original file line number Diff line number Diff line change 22 IPage ,
33 IPageSettings ,
44 IRoadmapBoard ,
5- IRoadmapCategory ,
65 IRoadmapColumn ,
7- IRoadmapItem ,
86} from "@changes-page/supabase/types/page" ;
97import { getCategoryColorClasses } from "@changes-page/utils" ;
108import { Dialog , Transition } from "@headlessui/react" ;
@@ -22,12 +20,13 @@ import {
2220 BLACKLISTED_SLUGS ,
2321 fetchRenderData ,
2422 getRoadmapBySlug ,
23+ PageRoadmap ,
24+ RoadmapItemWithCategory ,
2525} from "../../../../lib/data" ;
2626import { getPageUrl } from "../../../../lib/url" ;
2727import { httpPost } from "../../../../utils/http" ;
2828
29- type RoadmapItem = IRoadmapItem & {
30- roadmap_categories ?: IRoadmapCategory | null ;
29+ type RoadmapItem = RoadmapItemWithCategory & {
3130 vote_count ?: number ;
3231} ;
3332
@@ -44,7 +43,7 @@ export default function RoadmapPage({
4443 board : IRoadmapBoard ;
4544 columns : IRoadmapColumn [ ] ;
4645 items : RoadmapItem [ ] ;
47- roadmaps : IRoadmapBoard [ ] ;
46+ roadmaps : PageRoadmap [ ] ;
4847} ) {
4948 usePageTheme ( settings ?. color_scheme ) ;
5049
You can’t perform that action at this time.
0 commit comments