Skip to content

Commit fa09b18

Browse files
committed
fix: used router to navigate
1 parent 51634fb commit fa09b18

File tree

1 file changed

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

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { FC, useContext, useMemo, useState } from 'react'
22
import { bind, debounce, isEmpty } from 'lodash'
33
import { toast } from 'react-toastify'
4+
import { useNavigate } from 'react-router-dom'
45
import classNames from 'classnames'
5-
import { useNavigate } from "react-router-dom"
66

77
import { profileContext, ProfileContextData } from '~/libs/core'
88
import { Button, IconSolid, InputDatePicker, InputMultiselectOption,
99
InputRadio, InputSelect, InputSelectReact, InputText, InputTextarea } from '~/libs/ui'
1010
import { InputSkillSelector } from '~/libs/shared'
11-
import { EnvironmentConfig } from '~/config'
1211

1312
import { getProjects } from '../../services/projects'
1413
import { ProjectTypes, ProjectTypeValues } from '../../constants'
@@ -18,7 +17,7 @@ import styles from './styles.module.scss'
1817
// eslint-disable-next-line
1918
const CopilotRequestForm: FC<{}> = () => {
2019
const { profile }: ProfileContextData = useContext(profileContext)
21-
const navigate = useNavigate();
20+
const navigate = useNavigate()
2221

2322
const [formValues, setFormValues] = useState<any>({})
2423
const [isFormChanged, setIsFormChanged] = useState(false)
@@ -222,7 +221,7 @@ const CopilotRequestForm: FC<{}> = () => {
222221
setPaymentType('')
223222
// Added a small timeout for the toast to be visible properly to the users
224223
setTimeout(() => {
225-
navigate("/requests")
224+
navigate('/requests')
226225
}, 1000)
227226
})
228227
.catch(e => {

0 commit comments

Comments
 (0)