Skip to content

Commit

Permalink
Merge pull request #40 from Aar-if/main
Browse files Browse the repository at this point in the history
Back button update
  • Loading branch information
itsvick authored Oct 15, 2024
2 parents 2d348bd + c14bdaf commit 5fc2d77
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import DatabaseIcon from "@mui/icons-material/Storage";
import CloseIcon from "@mui/icons-material/Close";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";


const menuItems = [
{ text: "Create", key: "create" },
{ text: "All My Contents", key: "allContents" },
Expand Down Expand Up @@ -51,10 +50,9 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => {
};

const goBack = () => {
window.history.back();
router.push("/");
};


const drawerContent = (
<Box margin={"1rem"} width={"100%"} height={"100%"}>
<Box
Expand All @@ -65,7 +63,7 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => {
>
<Box display="flex" alignItems="center">
<ListItemIcon>
<IconButton onClick={goBack}>
<IconButton onClick={goBack}>
<ArrowBackIcon sx={{ color: theme.palette.warning["100"] }} />
</IconButton>
<IconButton>
Expand Down

0 comments on commit 5fc2d77

Please sign in to comment.