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