| 1 | "use client"; |
| 2 | |
| 3 | import { Moon, Sun } from "lucide-react"; |
| 4 | import { useTheme } |
| 5 | |
| 6 | import { Button } |
| 7 | |
| 8 | export function ThemeToggle() |
| 9 | const { resolvedTheme, |
| 10 | |
| 11 | return ( |
| 12 | <Button |
| 13 | variant="ghost" |
| 14 | size="icon" |
| 15 | aria-label="Toggle theme" |
| 16 | onClick={() => |
| 17 | > |
| 18 | {/* both render, the dark variant picks one, so there is nothing to hydrate */ |
| 19 | <Sun className=" |
| 20 | <Moon className=" |
| 21 | </Button> |
| 22 | ); |
| 23 | } |