trying with the store and such
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import { Route, useNavigate } from "react-router-dom";
|
||||
|
||||
import { STORE_ITEMS } from "../../electron/store";
|
||||
import { useEffect } from "react";
|
||||
import { useGetUserDetails } from "../../controller/index";
|
||||
|
||||
export default function ProtectedRoute({ ...children }) {
|
||||
const { isLoading, isError } = useGetUserDetails();
|
||||
|
||||
useEffect(() => {
|
||||
console.log(window.electronAPI.store.get(STORE_ITEMS.AUTH_TOKENS));
|
||||
}, []);
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
if (isLoading) return <span>please wait while we authenticate you</span>;
|
||||
|
||||
Reference in New Issue
Block a user