diff --git a/packages/core/constants/supported-games.ts b/packages/core/constants/supported-games.ts new file mode 100644 index 0000000..1f27c38 --- /dev/null +++ b/packages/core/constants/supported-games.ts @@ -0,0 +1,11 @@ +/** + * Games listed on /games as supported at checkout via Paymenter's product + * config option — there's no API to read this list live (the admin API's + * `include` allowlist has no config-options relationship), so it's + * maintained by hand here. Keep in sync with the checkout dropdown. + */ +export const SUPPORTED_GAMES = [ + "Minecraft", + "Rust", + "Hytale", +] as const diff --git a/packages/ui/components/Layouts/Games/game-hub.tsx b/packages/ui/components/Layouts/Games/game-hub.tsx index 05387b8..00a9b83 100644 --- a/packages/ui/components/Layouts/Games/game-hub.tsx +++ b/packages/ui/components/Layouts/Games/game-hub.tsx @@ -31,6 +31,7 @@ import Link from "next/link" import { cn } from "@/lib/utils" import type { GamePlanSpec } from "@/packages/core/types/servers/game" import { Price } from "@/packages/ui/components/ui/price" +import { SUPPORTED_GAMES } from "@/packages/core/constants/supported-games" type SortKey = "default" | "asc" | "desc" @@ -224,6 +225,16 @@ export function GameHub({ plans }: GameHubProps) {
One set of plans for every game we support. Pick a tier below, then choose which game to deploy at checkout.
+