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:
parent
ed9694c246
commit
75dc20ca0b
13 changed files with 194 additions and 95 deletions
|
@ -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 }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue