Skip to content

Commit

Permalink
Merge pull request #395 from arun-s-aot/bugfix/FWF-4130-navbar-issues
Browse files Browse the repository at this point in the history
FWF-4130 [Bugfix] Sidebar hiding for anonymous public url added
  • Loading branch information
arun-s-aot authored Jan 2, 2025
2 parents c0d065b + 77e363a commit 659be20
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions forms-flow-service/src/helpers/helperServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ class HelperServices {
// Method to check if the current route matches the routes where sidebar shouldnt be shown
public static hideSideBarRoute(location: string): boolean {
const previewRouteParts = ["formflow","view-edit"]; // Route parts which is part of designer preview page
const exactRouteMatches = ["/","/tenant"]; // Routes where sidebar is not required
const exactRouteMatches = ["/","/tenant"]; // Exact Routes where sidebar is not required
const partOfRouteMatches = ["/public/"]; // Parts of Routes where sidebar is not required .

return (
previewRouteParts.every((route) => location.includes(route)) ||
exactRouteMatches.some((route) => location == route)
exactRouteMatches.some((route) => location == route) ||
partOfRouteMatches.some((route) => location.includes(route))
);
}
}
Expand Down

0 comments on commit 659be20

Please sign in to comment.