mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
Merge Tag v0.2.13
This commit is contained in:
@@ -120,9 +120,11 @@ export default function HabitList({ isTasksView }: { isTasksView: boolean}) {
|
||||
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div>
|
||||
<div className="flex justify-between items-center mb-6">
|
||||
<h1 className="text-3xl font-bold">{t(isTasksView ? "myTasks" : "myHabits")}</h1>
|
||||
<h1 className="text-xl xs:text-3xl font-bold">
|
||||
{t(isTasksView ? 'myTasks' : 'myHabits')}
|
||||
</h1>
|
||||
<span>
|
||||
<Button onClick={() => setModalConfig({ isOpen: true, isTask: isTasksView })}>
|
||||
<Plus className='mr-2 h-4 w-4' />{isTasksView ? t("addTaskButton") : t("addHabitButton")}
|
||||
@@ -178,18 +180,18 @@ export default function HabitList({ isTasksView }: { isTasksView: boolean}) {
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
activeHabits.map((habit: Habit) => (
|
||||
<HabitItem
|
||||
key={habit.id}
|
||||
habit={habit}
|
||||
onEdit={() => {
|
||||
setEditingHabit(habit)
|
||||
setModalConfig({ isOpen: true, isTask: isTasksView })
|
||||
}}
|
||||
onDelete={() => setDeleteConfirmation({ isOpen: true, habitId: habit.id })}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
activeHabits.map((habit: Habit) => (
|
||||
<HabitItem
|
||||
key={habit.id}
|
||||
habit={habit}
|
||||
onEdit={() => {
|
||||
setEditingHabit(habit)
|
||||
setModalConfig({ isOpen: true, isTask: isTasksView })
|
||||
}}
|
||||
onDelete={() => setDeleteConfirmation({ isOpen: true, habitId: habit.id })}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
|
||||
{archivedHabits.length > 0 && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user