fix: note du jour preview (type daily) + aide Readwise toujours visible
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user