Skip to content

Commit 8a88e6f

Browse files
committed
hide empty descriptions on habit view
1 parent a2d63c4 commit 8a88e6f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/habit/view.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ export const HabitView: React.FC = () => {
3636
<ButtonForm />
3737
</div>
3838

39-
<div className="flex flex-col gap-2">
40-
<Label className="text-muted-foreground/50">Description</Label>
41-
<HabitDescription />
42-
</div>
39+
{habit.description && (
40+
<div className="flex flex-col gap-2">
41+
<Label className="text-muted-foreground/50">Description</Label>
42+
<HabitDescription />
43+
</div>
44+
)}
4345

4446
<div className="flex flex-col gap-2">
4547
<Label className="text-muted-foreground/50">Progress</Label>

0 commit comments

Comments
 (0)