install and handle casle & prevent page dashboard & handle register and code verfication & get data in clinics page

This commit is contained in:
Ehsan
2025-05-27 03:40:06 +03:30
parent a9f98aea3b
commit d95815d4aa
27 changed files with 336 additions and 206 deletions
+8
View File
@@ -0,0 +1,8 @@
import { cookies } from "next/headers";
export async function getUser() {
const cookieStore = cookies();
const raw = cookieStore.get("user");
if (!raw) return null;
return JSON.parse(raw.value);
}