Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
360 Bytes
import * as React from 'react';
import type { UserContextValue } from '@/contexts/user-context';
import { UserContext } from '@/contexts/user-context';
export function useUser(): UserContextValue {
const context = React.useContext(UserContext);
if (!context) {
throw new Error('useUser must be used within a UserProvider');
}
return context;
}