Add Oudelaa dashboard API integration
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled

هذا الالتزام موجود في:
boutmoun123
2026-05-25 20:36:52 +03:00
الأصل 367fce6557
التزام 8863f61d00
90 ملفات معدلة مع 16694 إضافات و1 حذوفات

عرض الملف

@@ -0,0 +1,33 @@
"use client";
import { createContext, useContext } from "react";
import type { SuperAdminSessionResponse } from "@/types/api";
type SuperAdminSessionContextValue = {
session: SuperAdminSessionResponse | null;
permissions: string[];
};
const SuperAdminSessionContext = createContext<SuperAdminSessionContextValue>({
session: null,
permissions: [],
});
export function SuperAdminSessionProvider({
children,
value,
}: {
children: React.ReactNode;
value: SuperAdminSessionContextValue;
}) {
return (
<SuperAdminSessionContext.Provider value={value}>
{children}
</SuperAdminSessionContext.Provider>
);
}
export function useSuperAdminSession() {
return useContext(SuperAdminSessionContext);
}