Browse Source

fix: ParsedContent not updating with new content

content would only show if it was present when the component was
initially mounted
master
DanConwayDev 2 years ago
parent
commit
3ff2d0a923
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 11
      src/lib/components/events/content/ParsedContent.svelte

11
src/lib/components/events/content/ParsedContent.svelte

@ -1,10 +1,17 @@
<script lang="ts"> <script lang="ts">
import type { NDKTag } from "@nostr-dev-kit/ndk"; import type { NDKTag } from "@nostr-dev-kit/ndk";
import { isParsedNewLine, isParsedText, parseContent } from "./utils"; import {
isParsedNewLine,
isParsedText,
parseContent,
type ParsedPart,
} from "./utils";
export let content: string = ""; export let content: string = "";
export let tags: NDKTag[] = []; export let tags: NDKTag[] = [];
const fullContent = parseContent({ content, tags }); let fullContent: ParsedPart[] = [];
$: fullContent = parseContent({ content, tags });
</script> </script>
<div> <div>

Loading…
Cancel
Save