export interface IRole { id?: string|null; attributes?: { description: string; name: string; }; } export interface IUser { id?: string|null; attributes?: { blocked?: boolean; confirmed?: boolean; email?: string; role?: IRole; username?: string; }; } export const useMe = () => { const me = useState('me', () => null); const setMe = (user: IUser|null) => { me.value = user; }; return { me, setMe, }; };