Connect, collaborate, and grow with a community of TypeScript developers
do not query event challenges in completed section (#1711)
Aquib Baigd1caaa6a488f
diff --git a/apps/web/src/app/(profile)/[username]/completed/page.tsx b/apps/web/src/app/(profile)/[username]/completed/page.tsxindex e231280a..147982f4 100644--- a/apps/web/src/app/(profile)/[username]/completed/page.tsx+++ b/apps/web/src/app/(profile)/[username]/completed/page.tsx@@ -1,9 +1,9 @@import { prisma } from '@repo/db';-import { Challenges } from './_components/challenges';+import { Alert, AlertDescription, AlertTitle } from '@repo/ui/components/alert';+import Link from 'next/link';import { notFound } from 'next/navigation';import { auth } from '~/server/auth';-import { AlertTitle, Alert, AlertDescription } from '@repo/ui/components/alert';-import Link from 'next/link';+import { Challenges } from './_components/challenges';export default async function CompletedPage(props: { params: { username: string } }) {const [, username] = decodeURIComponent(props.params.username).split('@');@@ -50,6 +50,9 @@ export default async function CompletedPage(props: { params: { username: string},},},+ difficulty: {+ not: 'EVENT',+ },},});const session = await auth();@@ -73,7 +76,7 @@ export default async function CompletedPage(props: { params: { username: string</AlertTitle>{isOwnProfile ? (<AlertDescription className="flex justify-center">- <Link className="text-primary underline-offset-4 hover:underline" href="./explore">+ <Link className="text-primary underline-offset-4 hover:underline" href="/explore">Get started with your first challenge</Link></AlertDescription>