mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-06-29 17:05:44 +08:00
Added initial login logic
This commit is contained in:
parent
54c416ad74
commit
1f668be499
7 changed files with 135 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { toggle } from "../../Features/Login/LoginSlice";
|
||||
import { toggle_login } from "../../Features/Login/LoginSlice";
|
||||
import { Button } from "@mui/material";
|
||||
import styles from "../../styles";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
@ -19,7 +19,7 @@ export default function Logout(props: props) {
|
|||
const navigate = useNavigate();
|
||||
|
||||
async function logout() {
|
||||
await dispatch(toggle());
|
||||
await dispatch(toggle_login());
|
||||
navigate("/");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue