import * as React from "react"; import Box from "@mui/material/Box"; import IconButton from "@mui/material/IconButton"; import Typography from "@mui/material/Typography"; import Menu from "@mui/material/Menu"; import MenuIcon from "@mui/icons-material/Menu"; import Container from "@mui/material/Container"; import MenuItem from "@mui/material/MenuItem"; import { useNavigate } from "react-router-dom"; import Settings from "./Settings"; import { AppBar, Button, Grid, Toolbar } from "@mui/material"; const pages = [ { name: "Abdest Hakkında", href: "/abdesthakkinda" }, { name: "Abdest Nasıl Alınır?", href: "/abdestnasilalinir" }, { name: "Abdestin Etimolojisi", href: "/abdestetimoloji" }, { name: "Abdestin Hükümleri", href: "/abdestinhukumleri" }, { name: "Abdestin Farzları", href: "/abdestinfarzlari" }, { name: "Abdestin Sünnetleri", href: "/abdestinsunnetleri" }, { name: "Abdestin Mehrukları", href: "/abdestinmehruklari" }, { name: "Abdesti Bozan Durumlar", href: "/abdestbozandurumlar" }, { name: "Engelli Abdesti Nasıl Alınır?", href: "/engelliabdesti" }, { name: "Teyemmüm Abdesti Nasıl Alınır?", href: "/teyemmumabdesti", }, ]; function NavMenu() { const [anchorElNav, setAnchorElNav] = React.useState(null); const navigate = useNavigate(); const handleOpenNavMenu = (event) => { setAnchorElNav(event.currentTarget); }; const handleCloseNavMenu = (href) => { setAnchorElNav(null); if (href) { navigate(href); } }; return ( quickabdest {pages.map((page) => ( handleCloseNavMenu(page.href)}> {page.name} ))} quickabdest {pages.map((page) => ( ))} ); } export default NavMenu;