prepare admin for astro: inject clientprovider props directly from admin component

This commit is contained in:
dswbx
2024-11-28 10:04:14 +01:00
parent 2e0543b7ac
commit 6718419d41
8 changed files with 25 additions and 16 deletions

View File

@@ -17,11 +17,13 @@ export const queryClient = new QueryClient({
}
});
export const ClientProvider = ({
children,
baseUrl,
user
}: { children?: any; baseUrl?: string; user?: TApiUser | null }) => {
export type ClientProviderProps = {
children?: any;
baseUrl?: string;
user?: TApiUser | null | undefined;
};
export const ClientProvider = ({ children, baseUrl, user }: ClientProviderProps) => {
const [actualBaseUrl, setActualBaseUrl] = useState<string | null>(null);
const winCtx = useBkndWindowContext();