mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 09:44:53 +01:00
move user's focus to top of screen upon publish
This commit is contained in:
parent
fb095460ab
commit
2c2bf3cef1
@ -74,6 +74,9 @@ export default function PublishPage({
|
|||||||
initialStatus="empty"
|
initialStatus="empty"
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
onSubmit={async (values, { setSubmitting, resetForm }) => {
|
onSubmit={async (values, { setSubmitting, resetForm }) => {
|
||||||
|
// move user's focus to top of screen
|
||||||
|
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
|
||||||
|
// kick off publishing
|
||||||
await handleSubmit(values, resetForm)
|
await handleSubmit(values, resetForm)
|
||||||
setSubmitting(false)
|
setSubmitting(false)
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user