refactor: reorganize imports and improve session handling in various components 🔨
Some checks are pending
Build and Push Docker Images / Build and Push Docker Images (push) Has started running

This commit is contained in:
2025-07-01 07:53:21 +05:00
parent 1549b209b3
commit a6d844e8d1
11 changed files with 121 additions and 143 deletions

View File

@ -1,7 +1,7 @@
import { getServerSession } from "next-auth";
import { Suspense } from "react";
import { authOptions } from "@/app/auth";
import { UsersPaymentsTable } from "@/components/admin/user-payments-table";
import { getServerSession } from "next-auth";
import React, { Suspense } from "react";
export default async function UserPayments({
searchParams,
@ -14,13 +14,12 @@ export default async function UserPayments({
}>;
}) {
const query = (await searchParams)?.query || "";
const session = await getServerSession(authOptions);
// const session = await getServerSession(authOptions);
return (
<div>
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
<h3 className="text-sarLinkOrange text-2xl">User Payments</h3>
</div>
<pre>{JSON.stringify(session, null, 2)}</pre>
<Suspense key={query} fallback={"loading...."}>
<UsersPaymentsTable searchParams={searchParams} />
</Suspense>