Skip to content

Commit

Permalink
FIX: synamic server error
Browse files Browse the repository at this point in the history
  • Loading branch information
theritiktiwari committed Jun 23, 2024
1 parent eca017c commit 1b46759
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/(root)/account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
"use client";

import { GetCurrentUser } from "@/services/users";
import { getTestResults } from "@/services/tests";
import { AccountDetails } from "@/components/shared/AccountDetails";
import { TestDetails } from "@/components/shared/TestDetails";
import { redirect } from "next/navigation";

export const dynamic = 'force-dynamic';

export default async function Page() {
const userResponse = await GetCurrentUser();
if (!userResponse?.success) {
redirect("/auth");
}
// @ts-ignore
const user = userResponse?.value;
const testResponse = await getTestResults({ userId: user?._id.toString() });
Expand Down

0 comments on commit 1b46759

Please sign in to comment.