mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
Отрефакторил бэк, исправил ошибки (#138)
* fixed paths to match refactored backend * fixed some paths according to new backend * fixed auth urls for new endpoints * fixed urls * fixed error handling * fixes * fixed error handling on user form * fixed error handling on oauth * using fallback: true on node pages * type button for comment attach buttons * fixed return types of social delete * changed the way we upload user avatars
This commit is contained in:
parent
1745cc636d
commit
080d59858c
42 changed files with 544 additions and 420 deletions
|
@ -4,7 +4,7 @@ import { observer } from 'mobx-react-lite';
|
|||
|
||||
import { EMPTY_USER } from '~/constants/auth';
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
import { useMessageEventReactions } from '~/hooks/auth/useMessageEventReactions';
|
||||
import { useOauthEventListeners } from '~/hooks/auth/useOauthEventListeners';
|
||||
import { useRestorePasswordRedirect } from '~/hooks/auth/useRestorePasswordRedirect';
|
||||
import { useSessionCookie } from '~/hooks/auth/useSessionCookie';
|
||||
|
||||
|
@ -14,7 +14,7 @@ const AuthContext = createContext<AuthProviderContextType>({
|
|||
user: EMPTY_USER,
|
||||
isUser: false,
|
||||
isTester: false,
|
||||
setIsTester: isTester => isTester,
|
||||
setIsTester: (isTester) => isTester,
|
||||
logout: () => {},
|
||||
login: async () => EMPTY_USER,
|
||||
setToken: () => {},
|
||||
|
@ -23,7 +23,7 @@ const AuthContext = createContext<AuthProviderContextType>({
|
|||
export const AuthProvider: FC = observer(({ children }) => {
|
||||
const value = useAuth();
|
||||
|
||||
useMessageEventReactions();
|
||||
useOauthEventListeners();
|
||||
useRestorePasswordRedirect();
|
||||
useSessionCookie();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue