diff --git a/app/habits/page.tsx b/app/habits/page.tsx index db6bb0e..4ce0f9d 100644 --- a/app/habits/page.tsx +++ b/app/habits/page.tsx @@ -3,7 +3,7 @@ import HabitList from '@/components/HabitList' export default function HabitsPage() { return (
When: {convertMachineReadableFrequencyToHumanReadable({ frequency: habit.frequency, - isRecurRule, + isRecurRule: pathname.includes("habits"), timezone: settings.system.timezone })}
diff --git a/components/HabitList.tsx b/components/HabitList.tsx index e1cfd70..ac9877a 100644 --- a/components/HabitList.tsx +++ b/components/HabitList.tsx @@ -5,7 +5,7 @@ import { Input } from '@/components/ui/input'; // Added import { Label } from '@/components/ui/label'; // Added import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; // Added import { useHabits } from '@/hooks/useHabits' -import { browserSettingsAtom, habitsAtom } from '@/lib/atoms' +import { habitsAtom } from '@/lib/atoms' import { HabitIcon, TaskIcon } from '@/lib/constants' import { Habit } from '@/lib/types' import { getHabitFreq } from '@/lib/utils'; // Added @@ -19,12 +19,9 @@ import EmptyState from './EmptyState' import HabitItem from './HabitItem' import { ViewToggle } from './ViewToggle' -export default function HabitList() { +export default function HabitList({ isTasksView }: { isTasksView: boolean}) { const { saveHabit, deleteHabit } = useHabits() const [habitsData] = useAtom(habitsAtom) // setHabitsData removed as it's not used - const [browserSettings] = useAtom(browserSettingsAtom) - const isTasksView = browserSettings.viewType === 'tasks' - // const [settings] = useAtom(settingsAtom); // settingsAtom is not directly used in HabitList itself. type SortableField = 'name' | 'coinReward' | 'dueDate' | 'frequency'; type SortOrder = 'asc' | 'desc'; @@ -131,9 +128,6 @@ export default function HabitList() {