Game name now visible on game mod cards and sliders. Mod post reactions now functional. Zap refactored. #33

Merged
freakoverse merged 13 commits from staging into master 2024-09-05 10:39:45 +00:00
Showing only changes of commit 87359a914e - Show all commits

View File

@ -1882,13 +1882,15 @@ const Reactions = ({ modDetails }: ReactionsProps) => {
?.signEvent(unsignedEvent)
.then((event) => event as Event)
.catch((err) => {
toast.error('Failed to sign the event!')
toast.error('Failed to sign the reaction event!')
log(true, LogType.Error, 'Failed to sign the event!', err)
return null
})
if (!signedEvent) return
setReactionEvents((prev) => [...prev, signedEvent])
const publishedOnRelays = await RelayController.getInstance().publish(
signedEvent as Event,
modDetails.author,
@ -1896,11 +1898,13 @@ const Reactions = ({ modDetails }: ReactionsProps) => {
)
if (publishedOnRelays.length === 0) {
toast.error('Failed to publish reaction event on any relay')
log(
true,
LogType.Error,
'Failed to publish reaction event on any relay'
)
return
}
setReactionEvents((prev) => [...prev, signedEvent])
} finally {
setIsReactionInProgress(false)
}