File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { FC } from 'react'
22import InfoMessage from './InfoMessage'
3- import { useHistory } from 'react-router-dom'
43import Button from './base/forms/Button'
54import { ChangeRequestSummary } from 'common/types/responses'
5+ import { RouterChildContext } from 'react-router-dom'
66
77type ExistingChangeRequestAlertType = {
88 changeRequests : ChangeRequestSummary [ ]
@@ -11,18 +11,18 @@ type ExistingChangeRequestAlertType = {
1111 projectId : number | string
1212 environmentId : string
1313 className ?: string
14+ history : RouterChildContext [ 'router' ] [ 'history' ]
1415}
1516
1617const ExistingChangeRequestAlert : FC < ExistingChangeRequestAlertType > = ( {
1718 changeRequests,
1819 className,
1920 editingChangeRequest,
2021 environmentId,
22+ history,
2123 projectId,
2224 scheduledChangeRequests,
2325} ) => {
24- const history = useHistory ( )
25-
2626 const handleNavigate = ( ) => {
2727 const changes = scheduledChangeRequests ?. length
2828 ? scheduledChangeRequests
Original file line number Diff line number Diff line change @@ -837,6 +837,7 @@ const CreateFlag = class extends Component {
837837 { ! ! isEdit && ! identity && (
838838 < ExistingChangeRequestAlert
839839 className = 'mb-4'
840+ history = { this . props . history }
840841 editingChangeRequest = { this . props . changeRequest }
841842 projectId = { this . props . projectId }
842843 environmentId = { this . props . environmentId }
You can’t perform that action at this time.
0 commit comments