Skip to content

Commit c269802

Browse files
committed
Fix types
1 parent dfb80cf commit c269802

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

apps/page/lib/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

apps/page/pages/_sites/[site]/roadmap/[roadmap_slug].tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import {
22
IPage,
33
IPageSettings,
44
IRoadmapBoard,
5-
IRoadmapCategory,
65
IRoadmapColumn,
7-
IRoadmapItem,
86
} from "@changes-page/supabase/types/page";
97
import { getCategoryColorClasses } from "@changes-page/utils";
108
import { 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";
2626
import { getPageUrl } from "../../../../lib/url";
2727
import { 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

0 commit comments

Comments
 (0)