diff --git a/src/components/FourZeroFour/index.jsx b/src/components/FourZeroFour/index.jsx index 24977e2..fccca38 100644 --- a/src/components/FourZeroFour/index.jsx +++ b/src/components/FourZeroFour/index.jsx @@ -1,5 +1,5 @@ import React from "react"; -import Lottie from "react-lottie"; +// import Lottie from "react-lottie"; import { useNavigate } from "react-router-dom"; import * as animationData from "../../assets/images/Lotties/77618-website-404-error-animation.json"; @@ -16,7 +16,7 @@ export default function FourZeroFour() { return (
- + {/* */}
:
- + {(props => { return (
- { - profile.data.length ? - profile.data.map((item, index) => ( -
+ +
{/* inputs starts here */} @@ -153,7 +126,7 @@ export default function PersonalInfoTab({ type="text" name="username" placeholder="" - value={item.username} + value={userDetails.username} disable={true} />
@@ -205,7 +178,7 @@ export default function PersonalInfoTab({ label="Country" type="text" name="country" - value={item.country} + value={userDetails.country} disable={true} />
@@ -324,41 +297,35 @@ export default function PersonalInfoTab({
-
- )) - : - profile.status ? -
No User Information Found!
- : -
Opps! something went wrong. Try Again Later!
- } -
- {requestStatus.message != '' &&

{requestStatus.message}

} -
-
- - - {" "} - Cancel - - +
- {requestStatus.loading ? - - : - - } +
+ {requestStatus.message != '' &&

{requestStatus.message}

} +
+
+ + + {" "} + Cancel + + + + {requestStatus.loading ? + + : + + } +
-
) })} diff --git a/src/middleware/AuthRoute.jsx b/src/middleware/AuthRoute.jsx index f57ec6e..7629db3 100644 --- a/src/middleware/AuthRoute.jsx +++ b/src/middleware/AuthRoute.jsx @@ -46,13 +46,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => { setIsLogin({loading: false, status: false}) }) } - const getProfile = useCallback(()=>{ - loadProfile() // API CALL TO GET USER PROFILE - }, []) useEffect(() => { if(!isLogin.status){ - getProfile() + loadProfile() // LOADS USER PROFILE DETAILS AND CALLS DISPATCH UPDATEUSERDETAILS TO UPDATE USERDETAILS SLICE IN STORE } const checkInactivity = setInterval(() => {