Files
ember-market-frontend/components/theme-toggle.tsx
g 0176f89cb7 Add CSV export for orders and update UI symbols
Introduces an exportOrdersToCSV function in lib/api-client.ts to allow exporting orders by status as a CSV file. Updates various UI components to use the '•' (bullet) symbol instead of '·' (middle dot) and replaces some emoji/unicode characters for improved consistency and compatibility. Also normalizes the 'use client' directive to include a BOM in many files.
2025-12-15 17:57:18 +00:00

31 lines
822 B
TypeScript

"use client"
import * as React from "react"
import { Moon, Sun } from "lucide-react"
import { useTheme } from "next-themes"
export function ThemeToggle() {
const [mounted, setMounted] = React.useState(false)
const { theme, setTheme } = useTheme()
React.useEffect(() => {
setMounted(true)
}, [])
if (!mounted) {
return null
}
return (
<button
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
className="relative p-2 hover:bg-gray-100 dark:hover:bg-[#1F1F23] rounded-full transition-colors"
>
<Sun className="h-5 w-5 text-gray-600 dark:text-gray-300 transition-all dark:hidden" />
<Moon className="h-5 w-5 text-gray-600 dark:text-gray-300 transition-all hidden dark:block" />
<span className="sr-only">Toggle theme</span>
</button>
)
}