diff --git a/src/components/Partials/Header.jsx b/src/components/Partials/Header.jsx
index 1ec941f..024e1b9 100644
--- a/src/components/Partials/Header.jsx
+++ b/src/components/Partials/Header.jsx
@@ -105,8 +105,6 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
let userEmail = email?.split("@")[0];
const userProfileImage = image || DEFAULT_PROFILE_IMAGE;
- console.log(userDetails);
-
return (
<>
diff --git a/src/components/Partials/Layout.jsx b/src/components/Partials/Layout.jsx
index 1b6e44f..f7963b2 100644
--- a/src/components/Partials/Layout.jsx
+++ b/src/components/Partials/Layout.jsx
@@ -23,6 +23,7 @@ export default function Layout({ children }) {
localStorage.removeItem("session_token");
localStorage.removeItem("member_id");
localStorage.removeItem("uid");
+ sessionStorage.removeItem("family_uid");
// localStorage.clear();
// toast.success("Come Back Soon", {
// icon: `🙂`,
diff --git a/src/middleware/AuthRoute.jsx b/src/middleware/AuthRoute.jsx
index 4444e99..cc31cf7 100644
--- a/src/middleware/AuthRoute.jsx
+++ b/src/middleware/AuthRoute.jsx
@@ -21,10 +21,12 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
const navigate = useNavigate();
- const { jobListTable, walletTable } = useSelector((state) => state.tableReload);
+ const { jobListTable, walletTable } = useSelector(
+ (state) => state.tableReload
+ );
const {
- userDetails: { username, uid, session },
+ userDetails: { username, uid, session},
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
let loggedIn = username && session && uid ? true : false; // variable to determine if user is logged in
@@ -35,6 +37,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
localStorage.removeItem("uid");
localStorage.removeItem("member_id");
localStorage.removeItem("session_token");
+ sessionStorage.removeItem("family_uid");
navigate("/login", { replace: true }); // redirects user to login page after session expires
};
@@ -181,13 +184,15 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
useEffect(() => {
const getMyWalletList = async () => {
- dispatch(updateWalletDetails({ loading: true, data:[] }));
+ dispatch(updateWalletDetails({ loading: true, data: [] }));
try {
const res = await apiCall.getUserWallets();
console.log("wallet - >", res.data);
- dispatch(updateWalletDetails({ loading: false, data:res.data?.result_list }));
+ dispatch(
+ updateWalletDetails({ loading: false, data: res.data?.result_list })
+ );
} catch (error) {
- dispatch(updateWalletDetails({ loading: false, data:[] }));
+ dispatch(updateWalletDetails({ loading: false, data: [] }));
console.log("Error getting mode");
}
};