24 lines
705 B
TypeScript

import { createContext } from 'react';
import { ProfilePageViewStatusContextType, UsersPageContextType } from 'types';
import RootStore from '../stores/RootStore';
export const StoreContext = createContext<RootStore | undefined>(undefined);
export const ProfilePageContext = createContext<ProfilePageViewStatusContextType>({
statusPageView: 'default',
setStatusPageView: () => {},
pageData: {},
setPageData: () => {},
});
export const UsersPageContext = createContext<UsersPageContextType>({
searchingRole: undefined,
setSearchingRole: () => {},
loading: false,
setLoading: () => {},
search: undefined,
setSearch: () => {},
editingUser: undefined,
setEditingUser: () => {},
});