install and handle casle & prevent page dashboard & handle register and code verfication & get data in clinics page
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user