Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: AOT challenges appearing in explore

bautistaaaa83aed1240b1
diff --git a/apps/web/src/app/[locale]/explore/_components/explore.action.ts b/apps/web/src/app/[locale]/explore/_components/explore.action.ts
index a649f901..386a305b 100644
--- a/apps/web/src/app/[locale]/explore/_components/explore.action.ts
+++ b/apps/web/src/app/[locale]/explore/_components/explore.action.ts
@@ -3,6 +3,7 @@
import { auth } from '@repo/auth/server';
import { prisma } from '@repo/db';
import { Tags, type Difficulty } from '@repo/db/types';
+import { AOT_CHALLENGES } from '../../challenge/[slug]/aot-slugs';
export type ExploreChallengeData = ReturnType<typeof getChallengesByTagOrDifficulty>;
const allTags: Tags[] = Object.values(Tags);
@@ -22,6 +23,9 @@ export async function getChallengesByTagOrDifficulty(str: string, take?: number)
status: 'BANNED',
},
},
+ slug: {
+ notIn: AOT_CHALLENGES,
+ },
// OR didn't work. so this workaround is fine because IT WORKS :3
...(allTags.includes(formattedStr as keyof typeof Tags)
? {