Remove duplicate dark mode toggle from menu

This commit is contained in:
Manohar Gupta 2026-05-10 15:55:34 +05:30
parent 83314e91a8
commit 38a773f882

View file

@ -2,11 +2,9 @@
import Link from "next/link"; import Link from "next/link";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { useTheme } from "../ThemeProvider";
export default function MenuPage() { export default function MenuPage() {
const router = useRouter(); const router = useRouter();
const { theme, toggle: toggleTheme } = useTheme();
const menuItems = [ const menuItems = [
{ icon: "🏠", label: "Home", href: "/" }, { icon: "🏠", label: "Home", href: "/" },
@ -39,18 +37,8 @@ export default function MenuPage() {
))} ))}
</div> </div>
{/* Bottom Section */} {/* Bottom Section - Settings only */}
<div className="absolute bottom-0 left-0 right-0 p-4"> <div className="absolute bottom-0 left-0 right-0 p-4">
{/* Dark Mode Toggle */}
<button
onClick={toggleTheme}
className="flex items-center gap-4 p-4 bg-white dark:bg-gray-800 rounded-xl w-full mb-2"
>
<span className="text-2xl">{theme === "dark" ? "🌙" : "☀️"}</span>
<span className="font-medium">{theme === "dark" ? "Dark Mode" : "Light Mode"}</span>
</button>
{/* Settings */}
<Link <Link
href="/settings" href="/settings"
className="flex items-center gap-4 p-4 bg-white dark:bg-gray-800 rounded-xl" className="flex items-center gap-4 p-4 bg-white dark:bg-gray-800 rounded-xl"