diff --git a/src/router/hoc/authenticationCheck.tsx b/src/router/hoc/authenticationCheck.tsx index 8a28e518..fae18962 100644 --- a/src/router/hoc/authenticationCheck.tsx +++ b/src/router/hoc/authenticationCheck.tsx @@ -35,7 +35,9 @@ export default function (SpecificComponent: ReactNode, option: IOption) { if (user?.cptAuthCode === 'DF0002') { const pathname = history.location.pathname; - if (pathname != '/flight/Approvals/new') { + if ( + !(pathname == '/flight/Approvals/new' || pathname == '/rightMenu') + ) { props.history.replace('/flight/Approvals/new'); return; }