Skip to content

Commit

Permalink
fix(rewardCards): add proper types
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Dec 12, 2024
1 parent ee5cf51 commit f3a4c6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/rewards/rewardCards.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import type { GuildRewardType } from "@/lib/schemas/guildReward";
import type { FunctionComponent } from "react";
import { DiscordRewardCard } from "./DiscordRewardCard";
import { GuildPermissionRewardCard } from "./GuildPermissionRewardCard";
import { PointsRewardCard } from "./PointsRewardCard";
import type { RewardCardProps } from "./types";

export const rewardCards = {
GUILD: GuildPermissionRewardCard,
POINTS: PointsRewardCard,
DISCORD: DiscordRewardCard,
} as const; // TODO: add "satisfies..."
} as const satisfies Record<
Exclude<GuildRewardType, "FORM" | "TELEGRAM">,
FunctionComponent<RewardCardProps>
>;

0 comments on commit f3a4c6c

Please sign in to comment.