diff --git a/src/Components/ColoredCube/ColoredCube.tsx b/src/Components/ColoredCube/ColoredCube.tsx index 6e34a1f..9db5e10 100644 --- a/src/Components/ColoredCube/ColoredCube.tsx +++ b/src/Components/ColoredCube/ColoredCube.tsx @@ -1,4 +1,3 @@ -import { PropaneSharp } from "@mui/icons-material"; import React from "react"; export interface props { diff --git a/src/Components/Login/Login.tsx b/src/Components/Login/Login.tsx index 213121e..e8d2344 100644 --- a/src/Components/Login/Login.tsx +++ b/src/Components/Login/Login.tsx @@ -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); } diff --git a/src/Components/Logout/Logout.tsx b/src/Components/Logout/Logout.tsx index 4b99181..d7c90ff 100644 --- a/src/Components/Logout/Logout.tsx +++ b/src/Components/Logout/Logout.tsx @@ -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();