feat: removed top nav from new alerts landing page (#5538)

* feat: removed top nav from new alerts landing page

* feat: added new function to check new alerts landing page

---------

Co-authored-by: Vikrant Gupta <vikrant.thomso@gmail.com>
This commit is contained in:
rahulkeswani101 2024-07-29 11:42:55 +05:30 committed by GitHub
parent d00024b64a
commit 3134e8c1cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,14 @@ function TopNav(): JSX.Element | null {
[location.pathname],
);
if (isSignUpPage || isDisabled || isRouteToSkip) {
const isNewAlertsLandingPage = useMemo(
() =>
matchPath(location.pathname, { path: ROUTES.ALERTS_NEW, exact: true }) &&
!location.search,
[location.pathname, location.search],
);
if (isSignUpPage || isDisabled || isRouteToSkip || isNewAlertsLandingPage) {
return null;
}