Add context for toast messages (#7902)

* add context for toast

* add
This commit is contained in:
Minseo Lee
2025-03-07 02:46:09 +09:00
committed by GitHub
parent 29eef6188a
commit a7db0bac6f
22 changed files with 64 additions and 48 deletions
@@ -188,7 +188,7 @@ function DialogInner({
})
onUpdate?.()
control.close()
Toast.show(_(msg`Profile updated`))
Toast.show(_(msg({message: 'Profile updated', context: 'toast'})))
} catch (e: any) {
logger.error('Failed to update user profile', {message: String(e)})
}
@@ -134,7 +134,7 @@ let ProfileHeaderStandard = ({
const unblockAccount = React.useCallback(async () => {
try {
await queueUnblock()
Toast.show(_(msg`Account unblocked`))
Toast.show(_(msg({message: 'Account unblocked', context: 'toast'})))
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to unblock account', {message: e})