import Drawer from "@mui/material/Drawer"; import * as React from "react"; import ListItemButton from "@mui/material/ListItemButton"; import ListItemIcon from "@mui/material/ListItemIcon"; import ChatBubbleOutlineIcon from "@mui/icons-material/ChatBubbleOutline"; import ListItemText from "@mui/material/ListItemText"; import {useState} from "react"; import Toolbar from "@mui/material/Toolbar"; import Divider from "@mui/material/Divider"; import List from "@mui/material/List"; import SettingsIcon from "@mui/icons-material/Settings"; import AddIcon from "@mui/icons-material/Add"; import SubscribeDialog from "./SubscribeDialog"; const navWidth = 240; const Navigation = (props) => { const navigationList = ; return ( <> {/* Mobile drawer; only shown if menu icon clicked (mobile open) and display is small */} {navigationList} {/* Big screen drawer; persistent, shown if screen is big */} {navigationList} ); }; Navigation.width = navWidth; const NavList = (props) => { const [subscribeDialogOpen, setSubscribeDialogOpen] = useState(false); const handleSubscribeSubmit = (subscription) => { setSubscribeDialogOpen(false); props.onSubscribeSubmit(subscription); } return ( <> {props.subscriptions.size() > 0 && } setSubscribeDialogOpen(true)}> setSubscribeDialogOpen(false)} onSubmit={handleSubscribeSubmit} /> ); }; const NavSubscriptionList = (props) => { const subscriptions = props.subscriptions; return ( <> {subscriptions.map((id, subscription) => props.onSubscriptionClick(id)} />) } ); } const NavSubscriptionItem = (props) => { const subscription = props.subscription; return ( ); } export default Navigation;