diff --git a/client/src/components/postListItem.tsx b/client/src/components/postListItem.tsx index dee8d3c..b825d79 100644 --- a/client/src/components/postListItem.tsx +++ b/client/src/components/postListItem.tsx @@ -1,5 +1,4 @@ import { - Box, Button, Card, CardActionArea, diff --git a/client/src/components/topAppBar.tsx b/client/src/components/topAppBar.tsx index a1a65b0..4d8ced4 100644 --- a/client/src/components/topAppBar.tsx +++ b/client/src/components/topAppBar.tsx @@ -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 diff --git a/client/src/routes/Auth/authRoot.tsx b/client/src/routes/Auth/authRoot.tsx index 7cd9f52..6a45d52 100644 --- a/client/src/routes/Auth/authRoot.tsx +++ b/client/src/routes/Auth/authRoot.tsx @@ -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"; diff --git a/client/src/routes/postList.tsx b/client/src/routes/postList.tsx index 860603e..40306ee 100644 --- a/client/src/routes/postList.tsx +++ b/client/src/routes/postList.tsx @@ -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"; diff --git a/client/src/routes/root.tsx b/client/src/routes/root.tsx index 97d025f..b007b75 100644 --- a/client/src/routes/root.tsx +++ b/client/src/routes/root.tsx @@ -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 ( <>