Fix some state stuff, snapshot things in the right places

This commit is contained in:
Jon Staab
2025-02-18 17:15:41 -08:00
parent 08d8d45ecb
commit 60d107aed2
8 changed files with 34 additions and 19 deletions
@@ -10,12 +10,18 @@
import {publishReaction} from "@app/commands"
import {pushModal} from "@app/modal"
const {url, event, reply} = $props()
type Props = {
url: string
event: TrustedEvent
reply: () => void
}
const {url, event, reply}: Props = $props()
const onEmoji = ((event: TrustedEvent, url: string, emoji: NativeEmoji) => {
history.back()
publishReaction({event, relays: [url], content: emoji.unicode})
}).bind(undefined, $state.snapshot(event), url)
}).bind(undefined, event, url)
const showEmojiPicker = () => pushModal(EmojiPicker, {onClick: onEmoji}, {replaceState: true})