default login values removed

This commit is contained in:
victorAnumudu
2023-04-14 21:55:18 +01:00
parent 500c54d442
commit 9376f96543
2 changed files with 8 additions and 7 deletions
+6 -3
View File
@@ -69,9 +69,12 @@ const AuthInit: FC<WithChildren> = ({children}) => {
const requestUser = async (apiToken: string) => {
try {
if (!didRequest.current) {
const {data} = await getUserByToken(apiToken)
if (data) {
setCurrentUser(data)
// const {data} = await getUserByToken(apiToken)
// if (data) {
// setCurrentUser(data)
// }
if (localStorage.getItem('kt-auth-react-v')) {
setCurrentUser(auth.profile)
}
}
} catch (error) {