Skip to content

Commit 9470e33

Browse files
committed
fix build error
1 parent ef3aa82 commit 9470e33

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/components/ResourcesBySelector.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ type Props = z.input<typeof props>;
77
88
type DocsData = keyof CollectionEntry<"docs">["data"];
99
type VideosData = keyof CollectionEntry<"stream">["data"];
10+
type LearningPathsData = keyof CollectionEntry<"learning-paths">["data"];
1011
11-
type ResourcesData = DocsData | VideosData;
12+
type ResourcesData = DocsData | VideosData | LearningPathsData;
1213
1314
const props = z.object({
1415
tags: z.string().array().optional(),

src/components/ResourcesBySelector.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ import { setSearchParams } from "~/util/url";
1111

1212
type DocsData = keyof CollectionEntry<"docs">["data"];
1313
type VideosData = keyof CollectionEntry<"stream">["data"];
14+
type LearningPathsData = keyof CollectionEntry<"learning-paths">["data"];
1415

15-
type ResourcesData = DocsData | VideosData;
16+
type ResourcesData = DocsData | VideosData | LearningPathsData;
1617

1718
interface Props {
18-
resources: Array<CollectionEntry<"docs"> | CollectionEntry<"stream">>;
19+
resources: Array<
20+
| CollectionEntry<"docs">
21+
| CollectionEntry<"stream">
22+
| CollectionEntry<"learning-paths">
23+
>;
1924
facets: Record<string, string[]>;
2025
filters?: ResourcesData[];
2126
columns: number;

src/pages/resources/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const props = {
2626
"design-guide",
2727
"learning-path",
2828
]}
29-
filterables={["pcx_content_type", "tags"]}
29+
filterables={["pcx_content_type", "products"]}
3030
filterPlacement="left"
3131
columns={1}
3232
/>

src/pages/videos/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ const props = {
1515
---
1616

1717
<StarlightPage {...props}>
18-
<ResourcesBySelector types={["stream"]} columns={3} />
18+
<ResourcesBySelector types={["video"]} columns={3} />
1919
</StarlightPage>

0 commit comments

Comments
 (0)