🎨 Removed unused code and imports
Signed-off-by: Pau Costa <mico@micodev.es>pull/2/head
parent
4fdb17733d
commit
be57bd32b8
|
|
@ -1,5 +1,4 @@
|
|||
import {
|
||||
Box,
|
||||
Button,
|
||||
Card,
|
||||
CardActionArea,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import Toolbar from "@mui/material/Toolbar";
|
|||
import IconButton from "@mui/material/IconButton";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import Container from "@mui/material/Container";
|
||||
import Avatar from "@mui/material/Avatar";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
|
@ -13,9 +12,6 @@ import NotificationBell from "./notificationBell";
|
|||
import {useSelector} from "react-redux";
|
||||
import { postLogout, selectUserInfo } from "../app/loginSlice";
|
||||
import { useAppDispatch } from "../app/store";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
const settings = ["Profile", "Account", "Dashboard", "Logout"];
|
||||
|
||||
interface TopAppBarProps {
|
||||
height: number;
|
||||
|
|
@ -23,7 +19,6 @@ interface TopAppBarProps {
|
|||
|
||||
function TopAppBar(props: TopAppBarProps) {
|
||||
const dispatch = useAppDispatch();
|
||||
const navigate = useNavigate();
|
||||
const userInfo = useSelector(selectUserInfo);
|
||||
const [anchorElUser, setAnchorElUser] = React.useState<null | HTMLElement>(
|
||||
null
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Copyright } from "@mui/icons-material";
|
||||
import { Grid, Paper, Typography } from "@mui/material";
|
||||
import { Grid, Typography } from "@mui/material";
|
||||
import { Outlet, useNavigate } from "react-router-dom";
|
||||
import { StyledDivider } from "../../components/StyledComponents";
|
||||
import { useSelector } from "react-redux";
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import {
|
|||
selectAllPosts,
|
||||
selectFollowedPosts,
|
||||
} from "../app/postSlice";
|
||||
import { store, useAppDispatch } from "../app/store";
|
||||
import { useAppDispatch } from "../app/store";
|
||||
import { useEffect } from "react";
|
||||
import { Box, List, ListItem, ListItemText, Typography } from "@mui/material";
|
||||
import { Box, List, Typography } from "@mui/material";
|
||||
import { Post } from "../api";
|
||||
import PostListItem from "../components/postListItem";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Outlet, useNavigate } from "react-router-dom";
|
||||
import { Box } from "@mui/material";
|
||||
import { postLogout, selectLoggedIn, selectUserInfo } from "../app/loginSlice";
|
||||
import { useAppDispatch } from "../app/store";
|
||||
import { selectLoggedIn } from "../app/loginSlice";
|
||||
import { useSelector } from "react-redux";
|
||||
import { useEffect } from "react";
|
||||
import useWindowDimensions from "../app/hooks/useWindowDimensions";
|
||||
|
|
@ -14,7 +13,6 @@ const topAppBarHeight = 64;
|
|||
|
||||
export default function Root() {
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useAppDispatch();
|
||||
const loggedIn = useSelector(selectLoggedIn);
|
||||
const { width } = useWindowDimensions();
|
||||
|
||||
|
|
@ -24,9 +22,6 @@ export default function Root() {
|
|||
}
|
||||
}, [loggedIn, navigate]);
|
||||
|
||||
const handleClick = () => {
|
||||
dispatch(postLogout());
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in New Issue