Added empty component to the dashboard
This commit was merged in pull request #573.
This commit is contained in:
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
||||
import LoadingSpinner from "../components/Spinners/LoadingSpinner";
|
||||
import { formattedDate } from "../lib";
|
||||
import usersService from "../services/UsersService";
|
||||
import { commonHeadBanner } from "../store/CommonHeadBanner";
|
||||
import { recentActivitiesData } from "../store/RecentActivitiesData";
|
||||
@@ -10,8 +11,6 @@ import { updateJobs } from "../store/jobLists";
|
||||
import { updateNotifications } from "../store/notifications";
|
||||
import { updateUserJobList } from "../store/userJobList";
|
||||
import { updateWalletDetails } from "../store/walletDetails";
|
||||
import { formattedDate } from "../lib";
|
||||
import { tableReload } from "../store/TableReloads";
|
||||
|
||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
const apiCall = useMemo(() => new usersService(), []);
|
||||
@@ -26,7 +25,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
);
|
||||
|
||||
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
|
||||
@@ -227,7 +226,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
console.log("ERROR ", error);
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
||||
//FUNCTION TO GET COMMON HEAD DATA
|
||||
useEffect(() => {
|
||||
apiCall
|
||||
|
||||
Reference in New Issue
Block a user