import { IBlockData } from "@schlechtenburg/core"; 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, }; }; export interface IPage { id?: string|null; attributes?: { title?: string; block?: IBlockData|null; path?: string; }; } export const usePage = () => { const page = useState('page', () => null); const setPage = (newPage: IPage|null) => { page.value = newPage; }; return { page, setPage, }; };