Connect, collaborate, and grow with a community of TypeScript developers
fix: remove event from profile
bautistaaa8f5edd13f3cc
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 cdc51220..e132b906 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@@ -101,6 +101,11 @@ export async function getSolvedChallenges(userId: string) {});const allChallenges = await prisma.challenge.groupBy({+ where: {+ NOT: {+ difficulty: 'EVENT',+ },+ },by: ['difficulty'],_count: {_all: true,@@ -139,10 +144,6 @@ 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 76802b47..a35af1b0 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', 'EVENT'] as const;+export const DIFFICULTIES = ['BEGINNER', 'EASY', 'MEDIUM', 'HARD', 'EXTREME'] as const;interface ChallengesProgressProps {userId: string;