File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/apps/copilots/src/pages/copilot-request-form Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ workflows:
222
222
- LVT-256
223
223
- CORE-635
224
224
- feat/system-admin
225
- - pm-1464
225
+ - pm-1322
226
226
227
227
- deployQa :
228
228
context : org-global
Original file line number Diff line number Diff line change 1
1
import { FC , useContext , useMemo , useState } from 'react'
2
2
import { bind , debounce , isEmpty } from 'lodash'
3
3
import { toast } from 'react-toastify'
4
+ import { useNavigate } from 'react-router-dom'
4
5
import classNames from 'classnames'
5
6
6
7
import { profileContext , ProfileContextData } from '~/libs/core'
@@ -16,6 +17,7 @@ import styles from './styles.module.scss'
16
17
// eslint-disable-next-line
17
18
const CopilotRequestForm : FC < { } > = ( ) => {
18
19
const { profile } : ProfileContextData = useContext ( profileContext )
20
+ const navigate = useNavigate ( )
19
21
20
22
const [ formValues , setFormValues ] = useState < any > ( { } )
21
23
const [ isFormChanged , setIsFormChanged ] = useState ( false )
@@ -217,6 +219,10 @@ const CopilotRequestForm: FC<{}> = () => {
217
219
setIsFormChanged ( false )
218
220
setFormErrors ( { } )
219
221
setPaymentType ( '' )
222
+ // Added a small timeout for the toast to be visible properly to the users
223
+ setTimeout ( ( ) => {
224
+ navigate ( '/requests' )
225
+ } , 1000 )
220
226
} )
221
227
. catch ( e => {
222
228
toast . error ( e . message )
You can’t perform that action at this time.
0 commit comments