fix: note du jour preview (type daily) + aide Readwise toujours visible
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m31s
CI / Deploy production (on server) (push) Has been skipped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Antigravity
2026-05-29 19:19:21 +00:00
parent e711a3501d
commit c21c2d113a
2 changed files with 13 additions and 12 deletions

View File

@@ -195,7 +195,7 @@ export const NoteCard = memo(function NoteCard({
const [reminderDate, setReminderDate] = useState<Date | null>(note.reminder ? new Date(note.reminder) : null)
const sanitizedHtml = useMemo(() => {
if (note.type !== 'richtext' || !note.content) return ''
if ((note.type !== 'richtext' && note.type !== 'daily') || !note.content) return ''
return DOMPurify.sanitize(note.content)
}, [note.type, note.content])
@@ -692,7 +692,7 @@ export const NoteCard = memo(function NoteCard({
items={localCheckItems || optimisticNote.checkItems || note.checkItems || []}
onToggleItem={handleCheckItem}
/>
) : note.type === 'richtext' ? (
) : (note.type === 'richtext' || note.type === 'daily') ? (
<div className="text-sm text-foreground line-clamp-10 rt-preview" dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />
) : (
<div className="text-sm text-foreground line-clamp-10">