This commit is contained in:
2025-10-15 20:01:10 +02:00
parent 445f27a939
commit b02c9c5c41
2 changed files with 9 additions and 18 deletions

View File

@@ -16,6 +16,15 @@ const HabitDetailPage = () => {
const [habit, setHabit] = useState(null);
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
useEffect(() => {
// Load and apply saved theme on mount
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add(savedTheme);
}
}, []);
useEffect(() => {
loadHabit();
}, [id]);