Skip to content

Commit 2df6c37

Browse files
committed
fix: redirect to requests page once request is created
1 parent 258c6da commit 2df6c37

File tree

1 file changed

+4
-1
lines changed
  • src/apps/copilots/src/pages/copilot-request-form

1 file changed

+4
-1
lines changed

src/apps/copilots/src/pages/copilot-request-form/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ const CopilotRequestForm: FC<{}> = () => {
218218
setIsFormChanged(false)
219219
setFormErrors({})
220220
setPaymentType('')
221-
window.location.href = `https://copilots.${EnvironmentConfig.TC_DOMAIN}/requests`
221+
// Added a small timeout for the toast to be visible properly to the users
222+
setTimeout(() => {
223+
window.location.href = `https://copilots.${EnvironmentConfig.TC_DOMAIN}/requests`
224+
}, 1000)
222225
})
223226
.catch(e => {
224227
toast.error(e.message)

0 commit comments

Comments
 (0)