import { useSyncExternalStore } from 'react';
import { useStytch } from '../b2c/GlobalContextProvider.mjs';

// useStytchUser is a very lightweight copy-pasta of the hook from stytch-react
// If we end up calling this in several places, consider hoisting to global context
const useStytchUser$1 = ()=>{
    const stytch = useStytch();
    return useSyncExternalStore(stytch.onStateChange, ()=>stytch.user.getSync());
};

export { useStytchUser$1 as useStytchUser };
//# sourceMappingURL=useStytchUser.mjs.map
