wip: update design

This commit is contained in:
2024-02-16 14:11:49 +07:00
parent 296b11b7b8
commit f28a7ae82f
20 changed files with 218 additions and 172 deletions

View File

@@ -39,9 +39,7 @@ export function NoteContent({ className }: { className?: string }) {
const richContent = useMemo(() => {
if (event.kind !== Kind.Text) return content;
let parsedContent: string | ReactNode[] = stripHtml(
content.replace(/\n{2,}\s*/g, "\n"),
).result;
let parsedContent: string | ReactNode[] = stripHtml(content).result;
let linkPreview: string = undefined;
let images: string[] = [];
let videos: string[] = [];
@@ -176,7 +174,7 @@ export function NoteContent({ className }: { className?: string }) {
);
parsedContent = reactStringReplace(parsedContent, "\n", () => {
return <div key={nanoid()} className="h-3" />;
return <div key={nanoid()} />;
});
if (typeof parsedContent[0] === "string") {