Remove aliases, their time has not yet come

This commit is contained in:
Jon Staab
2025-04-16 10:36:21 -07:00
parent f3debe6c02
commit 303b8967e9
10 changed files with 41 additions and 93 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
import type {NodeViewProps} from "@tiptap/core"
import {deriveAliasDisplay} from "@app/state"
import {removeNil} from "@welshman/lib"
import {deriveProfileDisplay} from "@welshman/app"
export const makeMentionNodeView =
(url?: string) =>
({node}: NodeViewProps) => {
const dom = document.createElement("span")
const display = deriveAliasDisplay(node.attrs.pubkey, url)
const display = deriveProfileDisplay(node.attrs.pubkey, removeNil([url]))
dom.classList.add("tiptap-object")
+3 -2
View File
@@ -1,14 +1,15 @@
<script lang="ts">
import {removeNil} from "@welshman/lib"
import {displayPubkey, getPubkeyTagValues, getListTags} from "@welshman/util"
import {
userFollows,
deriveUserWotScore,
deriveHandleForPubkey,
displayHandle,
deriveProfileDisplay,
} from "@welshman/app"
import WotScore from "@lib/components/WotScore.svelte"
import ProfileCircle from "@app/components/ProfileCircle.svelte"
import {deriveAliasDisplay} from "@app/state"
type Props = {
value: string
@@ -18,7 +19,7 @@
const {value, url}: Props = $props()
const pubkey = value
const profileDisplay = deriveAliasDisplay(pubkey)
const profileDisplay = deriveProfileDisplay(pubkey, removeNil([url]))
const handle = deriveHandleForPubkey(pubkey)
const score = deriveUserWotScore(pubkey)