1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed user hydration

This commit is contained in:
Fedor Katurov 2022-11-22 10:46:41 +06:00
parent ed9694c246
commit 75dc20ca0b
13 changed files with 194 additions and 95 deletions

View file

@ -1,6 +1,7 @@
import { createContext, FC, useContext } from 'react';
import { observer } from 'mobx-react-lite';
import { boolean } from 'yup';
import { EMPTY_USER } from '~/constants/auth';
import { useAuth } from '~/hooks/auth/useAuth';
@ -18,6 +19,7 @@ const AuthContext = createContext<AuthProviderContextType>({
logout: () => {},
login: async () => EMPTY_USER,
setToken: () => {},
fetched: false,
});
export const AuthProvider: FC = observer(({ children }) => {