Skip to content

Commit

Permalink
FWF-4136 [Bugfix] Sidebar issue fixes with multi env (AOT-Technologie…
Browse files Browse the repository at this point in the history
…s#2467)

* FWF-4136 [Bugfix] Sidebar issue fixes with multi env

* FWF-4136 [Bugfix] SOnarcloud fixes
  • Loading branch information
arun-s-aot authored Dec 31, 2024
1 parent af77ba7 commit a4d441e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions forms-flow-web/src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ import { HelperServices } from '@formsflow/service';
const App = React.memo((props) => {
const { store, history, publish, subscribe, getKcInstance } = props;
const [isPreviewRoute,setIsPreviewRoute] = useState(false);
useEffect(()=> {
const location = window.location.pathname;
setIsPreviewRoute(() => HelperServices.hideSideBarRoute(location));
},[]);

useEffect(() => {
props.subscribe("ES_ROUTE", (msg,data) => {
if (data) {
const location = data.pathname;
if(location)
setIsPreviewRoute(() => HelperServices.hideSideBarRoute(location));
}
});
}, []);

return (
<div className={`main-container ${isPreviewRoute && 'm-0'}`}>
<Helmet>
Expand All @@ -45,6 +52,7 @@ const App = React.memo((props) => {
App.propTypes = {
history: PropTypes.any.isRequired,
store: PropTypes.any.isRequired,
subscribe: PropTypes.func,
};

export default App;

0 comments on commit a4d441e

Please sign in to comment.