storing cookies not working so whatever move on
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user