From 0d28c99ba9d5f6f26f34b9d166beb36b69bc9e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20Akg=C3=BCl?= <s86116@bht-berlin.de> Date: Thu, 29 Jun 2023 01:39:50 +0200 Subject: [PATCH] woops --- app/(content)/(user)/[userid]/page.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/(content)/(user)/[userid]/page.tsx b/app/(content)/(user)/[userid]/page.tsx index 62fdacd..80f8061 100644 --- a/app/(content)/(user)/[userid]/page.tsx +++ b/app/(content)/(user)/[userid]/page.tsx @@ -6,6 +6,7 @@ import { Skeleton } from "@/components/ui/skeleton" import { UserAvatar } from "@/components/user-avatar" import { db } from "@/lib/db" import { getFavoriteGames } from "@/lib/igdb" +import { getCurrentUser } from "@/lib/session" import { IGame } from "@/types/igdb-types" import { redirect } from "next/navigation" @@ -13,10 +14,6 @@ import { redirect } from "next/navigation" export default async function User({ params }: { params: { userid: string } }) { const user = await getCurrentUser() - /* if (user?.username !== params.userid) { - redirect('/') - } */ - const sessionUser = await db.user.findFirst({ where: { id: user?.id @@ -41,7 +38,6 @@ export default async function User({ params }: { params: { userid: string } }) { redirect('/') } - let favoritegames = undefined let playingGames = undefined let finishedGames = undefined -- GitLab