Skip to content

Commit 710dd0e

Browse files
committed
feat(Sponsor): rankOrderに型をつける
1 parent 6d37d72 commit 710dd0e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

2025/src/components/Sponsors/companies.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { getCollection } from "astro:content";
33
import Company from "./Company.astro";
44
import Heading from "../Heading.astro";
5+
import type { CollectionEntry } from "astro:content";
56
67
const sponsorsData = await getCollection("sponsors");
78
@@ -18,7 +19,12 @@ const sponsorsByRank = sponsors.reduce(
1819
{} as Record<string, typeof sponsors>,
1920
);
2021
21-
const rankOrder = ["platinum", "gold", "silver", "bronze"];
22+
const rankOrder = [
23+
"platinum",
24+
"gold",
25+
"silver",
26+
"bronze",
27+
] as CollectionEntry<"sponsors">["data"]["rank"][];
2228
2329
const rankNameMap = {
2430
platinum: "プラチナ",

0 commit comments

Comments
 (0)