Removed unused imports

This commit is contained in:
keannu125 2023-03-02 20:42:11 +08:00
parent e508733c5f
commit b0b5b5cf0f
3 changed files with 1 additions and 10 deletions

View file

@ -1,4 +1,3 @@
import { PropaneSharp } from "@mui/icons-material";
import React from "react";
export interface props {

View file

@ -1,4 +1,3 @@
import React, { useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { toggle } from "../../Features/Login/LoginSlice";
import { Button } from "@mui/material";
@ -11,16 +10,10 @@ export interface state {
}
export default function Login() {
const logged_in = useSelector((state: state) => state.logged_in.value);
const [status, setStatus] = useState("Not logged in");
const dispatch = useDispatch();
async function login() {
await dispatch(toggle());
if (logged_in) {
setStatus("Logged in");
} else {
setStatus("Not logged in");
}
await console.log("test " + logged_in);
}

View file

@ -1,5 +1,5 @@
import React from "react";
import { useSelector, useDispatch } from "react-redux";
import { useDispatch } from "react-redux";
import { toggle } from "../../Features/Login/LoginSlice";
import { Button } from "@mui/material";
import styles from "../../styles";
@ -15,7 +15,6 @@ export interface props {
}
export default function Logout(props: props) {
const logged_in = useSelector((state: state) => state.logged_in.value);
const dispatch = useDispatch();
const navigate = useNavigate();