Connect, collaborate, and grow with a community of TypeScript developers
fix: profile erroring with new enum
bautistaaab64455704f65
diff --git a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.tsindex d1eb64b9..cdc51220 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts+++ b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts@@ -139,6 +139,10 @@ export async function getSolvedChallenges(userId: string) {solved: 0,total: 0,},+ EVENT: {+ solved: 0,+ total: 0,+ },};// assign values to the challenges objectdiff --git a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/challenges-progress.tsx b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/challenges-progress.tsxindex a35af1b0..76802b47 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/challenges-progress.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/challenges-progress.tsx@@ -3,7 +3,7 @@ import { DifficultyBadge } from '@repo/ui/components/difficulty-badge';import { Progress } from '@repo/ui/components/progress';import { getSolvedChallenges } from './_actions';-export const DIFFICULTIES = ['BEGINNER', 'EASY', 'MEDIUM', 'HARD', 'EXTREME'] as const;+export const DIFFICULTIES = ['BEGINNER', 'EASY', 'MEDIUM', 'HARD', 'EXTREME', 'EVENT'] as const;interface ChallengesProgressProps {userId: string;diff --git a/apps/web/src/app/[locale]/wizard/_components/index.tsx b/apps/web/src/app/[locale]/wizard/_components/index.tsxindex 30564507..7981c24d 100644--- a/apps/web/src/app/[locale]/wizard/_components/index.tsx+++ b/apps/web/src/app/[locale]/wizard/_components/index.tsx@@ -32,7 +32,7 @@ export const enum STEPS {const testCaseRegex = new RegExp('(?:\n|^)s*(?:Equal|Extends|NotEqual|Expect)<');const createExploreCardSchema = z.object({- difficulty: z.enum(['BEGINNER', 'EASY', 'MEDIUM', 'HARD', 'EXTREME']),+ difficulty: z.enum(['BEGINNER', 'EASY', 'MEDIUM', 'HARD', 'EXTREME', 'EVENT']),name: createNoProfanitySchemaWithValidate((zodString) =>zodString.min(3, 'The name must be longer than 3 characters')