mirror of
https://github.com/sergeyyarkov/educt-client.git
synced 2026-10-11 10:19:22 +03:00
24 lines
705 B
TypeScript
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: () => {},
|
|
});
|