File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
frontend/src/features/idir/search Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 99 MaterialReactTable ,
1010 useMaterialReactTable ,
1111} from "material-react-table" ;
12- import * as routes from "../../../../routes/constants" ;
1312import OnRouteBCContext from "../../../../common/authentication/OnRouteBCContext" ;
1413import { Optional } from "../../../../common/types/common" ;
1514import { USER_ROLE } from "../../../../common/authentication/types" ;
@@ -101,9 +100,7 @@ export const IDIRPermitSearchResults = memo(
101100 const { data, isPending, isError } = searchResultsQuery ;
102101
103102 const navigate = useNavigate ( ) ;
104- const { handleSelectCompany } = useSetCompanyHandler (
105- routes . PROFILE_ROUTES . MANAGE ,
106- ) ;
103+ const { handleSelectCompany } = useSetCompanyHandler ( ) ;
107104 const fetchCompanyData = async ( companyId : number ) => {
108105 const searchURL = new URL ( `${ VEHICLES_URL } /companies/${ companyId } ` ) ;
109106 searchURL . searchParams . set ( "page" , pagination . pageIndex . toString ( ) ) ;
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ import { VerifiedClient } from "../../../../common/authentication/types";
77
88export type CompanyOrClient = CompanyProfile | VerifiedClient ;
99
10- export const useSetCompanyHandler = (
11- redirectRoute : string = routes . APPLICATIONS_ROUTES . BASE ,
12- ) => {
10+ export const useSetCompanyHandler = ( ) => {
1311 const navigate = useNavigate ( ) ;
1412
1513 const context = useContext ( OnRouteBCContext ) ;
@@ -32,7 +30,7 @@ export const useSetCompanyHandler = (
3230 setOnRouteBCClientNumber ?.( ( ) => clientNumber ) ;
3331 setIsCompanySuspended ?.( ( ) => isSuspended ) ;
3432 sessionStorage . setItem ( "onRouteBC.user.companyId" , companyId . toString ( ) ) ;
35- navigate ( redirectRoute ) ;
33+ navigate ( routes . APPLICATIONS_ROUTES . BASE ) ;
3634 } else {
3735 const {
3836 migratedClientHash,
You can’t perform that action at this time.
0 commit comments