mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
Rename var
This commit is contained in:
parent
d1a263ce38
commit
45d641addb
|
@ -10,10 +10,10 @@ export type AuthState = {
|
||||||
refreshAuthState: (() => void) | null;
|
refreshAuthState: (() => void) | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Authentication = createContext<AuthState>({
|
const AuthenticationContext = createContext<AuthState>({
|
||||||
isLoggedIn: false,
|
isLoggedIn: false,
|
||||||
user: null,
|
user: null,
|
||||||
refreshAuthState: null,
|
refreshAuthState: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default Authentication;
|
export default AuthenticationContext;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { getMe } from '../api/api';
|
import { getMe } from '../api/api';
|
||||||
import Authentication, { AuthState } from './AuthenticationContext';
|
import AuthenticationContext, { AuthState } from './AuthenticationContext';
|
||||||
|
|
||||||
export default function AuthenticationWrapper({
|
export default function AuthenticationWrapper({
|
||||||
children,
|
children,
|
||||||
|
@ -37,9 +37,9 @@ export default function AuthenticationWrapper({
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Authentication.Provider value={authState}>
|
<AuthenticationContext.Provider value={authState}>
|
||||||
{children}
|
{children}
|
||||||
</Authentication.Provider>
|
</AuthenticationContext.Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user