fix double posting on slow connections

This commit is contained in:
keyan 2022-03-10 12:25:16 -06:00
parent f85b9a3a1d
commit d40b0ae063
3 changed files with 6 additions and 6 deletions

View File

@ -69,9 +69,9 @@ export function DiscussionForm ({
}
if (item) {
router.push(`/items/${item.id}`)
await router.push(`/items/${item.id}`)
} else {
router.push('/recent')
await router.push('/recent')
}
})}
storageKeyPrefix={item ? undefined : 'discussion'}

View File

@ -137,9 +137,9 @@ export default function JobForm ({ item, sub }) {
}
if (item) {
router.push(`/items/${item.id}`)
await router.push(`/items/${item.id}`)
} else {
router.push(`/~${sub.name}/recent`)
await router.push(`/~${sub.name}/recent`)
}
})}
>

View File

@ -100,9 +100,9 @@ export function LinkForm ({ item, editThreshold }) {
throw new Error({ message: error.toString() })
}
if (item) {
router.push(`/items/${item.id}`)
await router.push(`/items/${item.id}`)
} else {
router.push('/recent')
await router.push('/recent')
}
}}
storageKeyPrefix={item ? undefined : 'link'}