Add Oudelaa dashboard API integration
Deploy To Ghaymah / deploy (push) Has been cancelled

This commit is contained in:
boutmoun123
2026-05-25 20:36:52 +03:00
parent 367fce6557
commit 8863f61d00
90 changed files with 16694 additions and 1 deletions
@@ -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);
}