mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-17 21:31:43 +01:00
update applesauce
This commit is contained in:
parent
b724cb091e
commit
55b070d624
720
pnpm-lock.yaml
generated
720
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
|
||||
import { MenuItem } from "@chakra-ui/react";
|
||||
import { kinds } from "nostr-tools";
|
||||
import { useActiveAccount, useEventFactory } from "applesauce-react/hooks";
|
||||
import { removeEvent, addEventTag } from "applesauce-factory/operations/list/index";
|
||||
import { removeEventTag, addEventTag } from "applesauce-factory/operations/list/index";
|
||||
|
||||
import useUserPinList from "../../hooks/use-user-pin-list";
|
||||
import { NostrEvent } from "../../types/nostr-event";
|
||||
@ -32,7 +32,7 @@ export default function PinEventMenuItem({ event }: { event: NostrEvent }) {
|
||||
|
||||
const draft = await factory.modifyList(
|
||||
list || { kind: kinds.Pinlist },
|
||||
isPinned ? removeEvent(event.id) : addEventTag(event.id),
|
||||
isPinned ? removeEventTag(event.id) : addEventTag(event.id),
|
||||
);
|
||||
|
||||
await publish(label, draft);
|
||||
|
@ -10,7 +10,7 @@ import accounts from "./accounts";
|
||||
const factory$ = new BehaviorSubject<EventFactory>(
|
||||
new EventFactory({
|
||||
signer: accounts.active ?? undefined,
|
||||
getRelayHint: getEventRelayHint,
|
||||
getEventRelayHint,
|
||||
getPubkeyRelayHint: getPubkeyRelayHint,
|
||||
client: localSettings.addClientTag.value ? NIP_89_CLIENT_APP : undefined,
|
||||
}),
|
||||
@ -21,7 +21,7 @@ combineLatest([accounts.active$, localSettings.addClientTag]).pipe(
|
||||
map(([current, client]) => {
|
||||
return new EventFactory({
|
||||
signer: current ? current.signer : undefined,
|
||||
getRelayHint: getEventRelayHint,
|
||||
getEventRelayHint,
|
||||
getPubkeyRelayHint: getPubkeyRelayHint,
|
||||
client: client ? NIP_89_CLIENT_APP : undefined,
|
||||
});
|
||||
|
@ -59,8 +59,9 @@ export function getEventPointerRelayHint(pointerOrId: string | EventPointer): st
|
||||
}
|
||||
|
||||
/** Returns a single relay hint for an event */
|
||||
export function getEventRelayHint(event: NostrEvent): string | undefined {
|
||||
return getEventRelayHints(event, 1)[0];
|
||||
export function getEventRelayHint(id: string): string | undefined {
|
||||
const event = eventStore.getEvent(id);
|
||||
return event && getEventRelayHints(event, 1)[0];
|
||||
}
|
||||
|
||||
/** Returns a relay hint for a single pubkey */
|
||||
|
@ -42,7 +42,7 @@ export default function AppCard({
|
||||
<Text>{app.description}</Text>
|
||||
</Flex>
|
||||
|
||||
{canFavorite && <AppFavoriteButton app={app} variant="ghost" ms="auto" my="2" mr="2" />}
|
||||
{canFavorite && <AppFavoriteButton app={app} variant="ghost" ms="auto" my="2" mr="2" zIndex={1} />}
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user