This commit is contained in:
Shusui MOYATANI
2023-03-03 21:36:45 +09:00
parent 94c51d76c4
commit 43695734e4

View File

@@ -39,7 +39,7 @@ const TextNote: Component<TextNoteProps> = (props) => {
eventId: props.event.id,
}));
const { reposts, isRepostedBy } = useDeprecatedReposts(() => ({
const { reposts, isRepostedBy, invalidateDeprecatedReposts } = useDeprecatedReposts(() => ({
relayUrls: config().relayUrls,
eventId: props.event.id,
}));
@@ -55,12 +55,15 @@ const TextNote: Component<TextNoteProps> = (props) => {
const handleRepost: JSX.EventHandler<HTMLButtonElement, MouseEvent> = (ev) => {
ev.preventDefault();
commands.publishDeprecatedRepost({
relayUrls: config().relayUrls,
pubkey: pubkey(),
eventId: props.event.id,
notifyPubkey: props.event.pubkey,
});
commands
.publishDeprecatedRepost({
relayUrls: config().relayUrls,
pubkey: pubkey(),
eventId: props.event.id,
notifyPubkey: props.event.pubkey,
})
.then(() => invalidateDeprecatedReposts());
};
const handleReaction: JSX.EventHandler<HTMLButtonElement, MouseEvent> = (ev) => {