refactor: enhance parental control features and improve device blocking logic 🔨

This commit is contained in:
2025-07-02 23:29:40 +05:00
parent 40bf8413f8
commit c90b003167
7 changed files with 229 additions and 192 deletions

View File

@ -1,7 +1,4 @@
import { redirect } from "next/navigation";
import { getServerSession } from "next-auth";
import { Suspense } from "react";
import { authOptions } from "@/app/auth";
import { PaymentsTable } from "@/components/payments-table";
import Search from "@/components/search";
@ -16,10 +13,7 @@ export default async function Payments({
}>;
}) {
const query = (await searchParams)?.query || "";
const session = await getServerSession(authOptions);
if (session?.user?.is_admin) {
return redirect("/user-payments");
}
return (
<div>
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">