storing cookies not working so whatever move on

This commit is contained in:
talksik
2022-03-17 20:16:43 -04:00
parent 34fe8e0c29
commit 444c116f1b
4 changed files with 2 additions and 19 deletions
@@ -8,7 +8,7 @@ export default function ProtectedRoute({ ...children }) {
const { isLoading, isError } = useGetUserDetails();
useEffect(() => {
console.log(window.electronAPI.store.get(STORE_ITEMS.AUTH_TOKENS));
// console.log(window.electronAPI.store.get(STORE_ITEMS.AUTH_TOKENS));
}, []);
const navigate = useNavigate();
-9
View File
@@ -13,15 +13,6 @@ const electronAPI = {
},
batteryApi: {},
fileApi: {},
store: {
get(val: string) {
return ipcRenderer.sendSync("electron-store-get", val);
},
set(property: string, val: any) {
ipcRenderer.send("electron-store-set", property, val);
},
// Other method you want to add like has(), reset(), etc.
},
};
contextBridge.exposeInMainWorld("electronAPI", electronAPI);
-8
View File
@@ -48,14 +48,6 @@ app
console.log("initiating log in");
await handleLogin();
});
// IPC listener
ipcMain.on("electron-store-get", async (event, val) => {
event.returnValue = store.get(val);
});
ipcMain.on("electron-store-set", async (event, key, val) => {
store.set(key, val);
});
});
// Quit when all windows are closed, except on macOS. There, it's common
+1 -1
View File
@@ -45,7 +45,7 @@ export default function Login() {
) : (
<button
onClick={logIn}
className="text-white p-3 rounded shadow border-white"
className="text-white p-3 rounded shadow border border-white"
>
Sign In
</button>