@@ -46,6 +46,7 @@ import {
46
46
useUnsubscribeServiceMutation ,
47
47
} from 'features/serviceSubscription/serviceSubscriptionApiSlice'
48
48
import { Box } from '@mui/material'
49
+ import { useLocation } from 'react-router-dom'
49
50
50
51
interface FetchHookArgsType {
51
52
statusId : string
@@ -55,6 +56,7 @@ interface FetchHookArgsType {
55
56
export default function CompanySubscriptions ( ) {
56
57
const { t } = useTranslation ( )
57
58
const dispatch = useDispatch ( )
59
+ const location = useLocation ( )
58
60
const [ refresh , setRefresh ] = useState ( 0 )
59
61
const [ searchExpr , setSearchExpr ] = useState < string > ( '' )
60
62
const [ fetchHookArgs , setFetchHookArgs ] = useState < FetchHookArgsType > ( )
@@ -73,7 +75,9 @@ export default function CompanySubscriptions() {
73
75
const [ unsubscribeAppMutation ] = useUnsubscribeAppMutation ( )
74
76
const [ unsubscribeServiceMutation ] = useUnsubscribeServiceMutation ( )
75
77
const [ enableErrorMessage , setEnableErrorMessage ] = useState < boolean > ( false )
76
- const [ currentActive , setCurrentActive ] = useState < number > ( 0 )
78
+ const [ currentActive , setCurrentActive ] = useState < number > (
79
+ location . state ?. activeTab ?? 0
80
+ )
77
81
78
82
const setView = ( e : React . MouseEvent < HTMLInputElement > ) => {
79
83
const viewValue = e . currentTarget . value
0 commit comments