mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
completely removed flow-related sagas
This commit is contained in:
parent
5f3accee48
commit
38eedab3c2
26 changed files with 326 additions and 310 deletions
10
src/utils/context/StoreContextProvider.tsx
Normal file
10
src/utils/context/StoreContextProvider.tsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
import { Store } from '~/store';
|
||||
|
||||
export const StoreContext = createContext<Store>(new Store());
|
||||
|
||||
export const StoreContextProvider: FC<{ store: Store }> = ({ children, store }) => {
|
||||
return <StoreContext.Provider value={store}>{children}</StoreContext.Provider>;
|
||||
};
|
||||
|
||||
export const useStore = () => useContext(StoreContext);
|
Loading…
Add table
Add a link
Reference in a new issue