diff --git a/apps/editor/components/ui/sidebar/app-sidebar.tsx b/apps/editor/components/ui/sidebar/app-sidebar.tsx index 44a9ae7e..53993315 100644 --- a/apps/editor/components/ui/sidebar/app-sidebar.tsx +++ b/apps/editor/components/ui/sidebar/app-sidebar.tsx @@ -6,12 +6,9 @@ import { ArrowUpCircle, ChevronDown, Clock3, - Moon, RotateCcw, Save, - Sun, } from "lucide-react"; -import { motion } from "framer-motion"; import { useScene } from "@pascal-app/core"; import { @@ -47,7 +44,6 @@ import { } from "@/features/community/lib/models/actions"; import { useProjectStore } from "@/features/community/lib/projects/store"; import { updateProjectName } from "@/features/community/lib/projects/actions"; -import { useViewer } from "@pascal-app/viewer"; import { applySceneGraphToEditor } from "@/features/community/lib/models/hooks"; function formatRelativeTime(value: string): string { @@ -83,9 +79,6 @@ export function AppSidebar() { const setIsVersionPreviewMode = useProjectStore((s) => s.setIsVersionPreviewMode); const setIsSceneLoading = useProjectStore((s) => s.setIsSceneLoading); const setAutosaveStatus = useProjectStore((s) => s.setAutosaveStatus); - const theme = useViewer((state) => state.theme); - const setTheme = useViewer((state) => state.setTheme); - const [mounted, setMounted] = useState(false); const [isEditingTitle, setIsEditingTitle] = useState(false); const [titleValue, setTitleValue] = useState(""); @@ -107,7 +100,6 @@ export function AppSidebar() { const activeProjectId = activeProject?.id ?? null; useEffect(() => { - setMounted(true); // Widen default sidebar (288px → 432px) for better project title visibility const store = useSidebarStore.getState(); if (store.width <= 288) { @@ -700,56 +692,6 @@ export function AppSidebar() { )} - - {mounted && ( - setTheme(theme === 'dark' ? 'light' : 'dark')} - type="button" - aria-label="Toggle theme" - > - - {/* Sliding Background */} - - - {/* Dark Mode Icon */} - - - - - {/* Light Mode Icon */} - - - - - - )} diff --git a/apps/editor/components/ui/sidebar/icon-rail.tsx b/apps/editor/components/ui/sidebar/icon-rail.tsx index 74bbfa30..b55bea3b 100644 --- a/apps/editor/components/ui/sidebar/icon-rail.tsx +++ b/apps/editor/components/ui/sidebar/icon-rail.tsx @@ -5,6 +5,7 @@ import Link from "next/link"; import Image from "next/image"; import { useEffect, useState } from "react"; import { useRouter } from "next/navigation"; +import { motion } from "framer-motion"; import { Tooltip, TooltipContent, @@ -226,11 +227,18 @@ export function IconRail({ setTheme(theme === "dark" ? "light" : "dark")} type="button" > - {theme === "dark" ? : } + + {theme === "dark" ? : } + Toggle theme