trying with the store and such

This commit is contained in:
talksik
2022-03-17 20:13:49 -04:00
parent 453121c987
commit 34fe8e0c29
21 changed files with 478 additions and 35758 deletions
@@ -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>;