mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-20 22:24:28 +01:00
use linkify to automatically convert links to href (#15)
This commit is contained in:
@@ -11,6 +11,7 @@ import { d2s, getNow } from '@/lib/utils'
|
||||
import { useAtom } from 'jotai'
|
||||
import { settingsAtom } from '@/lib/atoms'
|
||||
import { DateTime } from 'luxon'
|
||||
import Linkify from './linkify'
|
||||
|
||||
export default function HabitCalendar() {
|
||||
const [settings] = useAtom(settingsAtom)
|
||||
@@ -73,7 +74,9 @@ export default function HabitCalendar() {
|
||||
const isCompleted = getHabitsForDate(selectedDate.toJSDate()).some(h => h.id === habit.id)
|
||||
return (
|
||||
<li key={habit.id} className="flex items-center justify-between">
|
||||
<span>{habit.name}</span>
|
||||
<span>
|
||||
<Linkify>{habit.name}</Linkify>
|
||||
</span>
|
||||
{isCompleted ? (
|
||||
<Badge variant="default">Completed</Badge>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user