receiving refresh token

This commit is contained in:
talksik
2022-03-13 22:02:42 -04:00
parent 6e916b2faf
commit 6a8268eacb
5 changed files with 148 additions and 54 deletions
+13 -2
View File
@@ -1,13 +1,24 @@
import { Button } from "@mui/material";
import Logo from "../../components/Logo";
import { channels } from "../../shared/constants";
import { useEffect } from "react";
export default function () {
export default function Login() {
const logIn = () => {
// send to main process
window.API.activateLogin();
window.API.send(channels.ACTIVATE_LOG_IN);
};
useEffect(() => {
window.API.receive(channels.AUTH_TOKEN, (data: any) => {
console.log(data);
});
// return () => {
// ipcRenderer.removeAllListeners(channels.AUTH_TOKEN);
// };
}, []);
return (
<div className="container flex flex-col space-y-5 justify-center items-center h-screen bg-slate-900">
<Logo className="scale-50" />