Skip to content

Commit

Permalink
taken suggestion from ai
Browse files Browse the repository at this point in the history
  • Loading branch information
PurnenduMIshra129th committed Feb 1, 2025
1 parent 6a38bc3 commit 23ebe30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/SecuredRoute/SecuredRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from '@apollo/client';
import { VERIFY_ROLE } from 'GraphQl/Queries/Queries';
import React, { useEffect } from 'react';
import { Navigate, Outlet } from 'react-router-dom';
import { Navigate, Outlet, useLocation } from 'react-router-dom';
import { toast } from 'react-toastify';
import PageNotFound from 'screens/PageNotFound/PageNotFound';
import useLocalStorage from 'utils/useLocalstorage';
Expand All @@ -16,6 +16,7 @@ const { getItem, setItem } = useLocalStorage();
* @returns The JSX element representing the secured route.
*/
const SecuredRoute = (): JSX.Element => {
const location = useLocation();
const { data, loading, error, refetch } = useQuery(VERIFY_ROLE, {
context: {
headers: {
Expand Down

0 comments on commit 23ebe30

Please sign in to comment.