Lint
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<script lang="ts">
|
||||
import type {NodeViewProps} from '@tiptap/core'
|
||||
import {NodeViewWrapper} from 'svelte-tiptap'
|
||||
import {ellipsize} from '@welshman/lib'
|
||||
import {type TrustedEvent, fromNostrURI, Address} from '@welshman/util'
|
||||
import Link from '@lib/components/Link.svelte'
|
||||
import {deriveEvent} from '@app/state'
|
||||
import type {NodeViewProps} from "@tiptap/core"
|
||||
import {NodeViewWrapper} from "svelte-tiptap"
|
||||
import {ellipsize} from "@welshman/lib"
|
||||
import {type TrustedEvent, fromNostrURI, Address} from "@welshman/util"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import {deriveEvent} from "@app/state"
|
||||
|
||||
export let node: NodeViewProps['node']
|
||||
export let node: NodeViewProps["node"]
|
||||
|
||||
const displayEvent = (e: TrustedEvent) =>
|
||||
e?.content.length > 1 ? ellipsize(e.content, 50) : fromNostrURI(nevent || naddr).slice(0, 16) + '...'
|
||||
e?.content.length > 1
|
||||
? ellipsize(e.content, 50)
|
||||
: fromNostrURI(nevent || naddr).slice(0, 16) + "..."
|
||||
|
||||
$: ({identifier, pubkey, kind, id, relays = [], nevent, naddr} = node.attrs)
|
||||
$: event = deriveEvent(id || new Address(kind, pubkey, identifier).toString(), relays)
|
||||
|
||||
Reference in New Issue
Block a user