mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-04-19 08:21:29 +08:00
Removed unused imports
This commit is contained in:
parent
e508733c5f
commit
b0b5b5cf0f
3 changed files with 1 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
||||||
import { PropaneSharp } from "@mui/icons-material";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export interface props {
|
export interface props {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import { toggle } from "../../Features/Login/LoginSlice";
|
import { toggle } from "../../Features/Login/LoginSlice";
|
||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
|
@ -11,16 +10,10 @@ export interface state {
|
||||||
}
|
}
|
||||||
export default function Login() {
|
export default function Login() {
|
||||||
const logged_in = useSelector((state: state) => state.logged_in.value);
|
const logged_in = useSelector((state: state) => state.logged_in.value);
|
||||||
const [status, setStatus] = useState("Not logged in");
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
async function login() {
|
async function login() {
|
||||||
await dispatch(toggle());
|
await dispatch(toggle());
|
||||||
if (logged_in) {
|
|
||||||
setStatus("Logged in");
|
|
||||||
} else {
|
|
||||||
setStatus("Not logged in");
|
|
||||||
}
|
|
||||||
await console.log("test " + logged_in);
|
await console.log("test " + logged_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { toggle } from "../../Features/Login/LoginSlice";
|
import { toggle } from "../../Features/Login/LoginSlice";
|
||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import styles from "../../styles";
|
import styles from "../../styles";
|
||||||
|
@ -15,7 +15,6 @@ export interface props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Logout(props: props) {
|
export default function Logout(props: props) {
|
||||||
const logged_in = useSelector((state: state) => state.logged_in.value);
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue