Skip to content

Commit

Permalink
update: showing top banner
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaaaavier committed Dec 16, 2024
1 parent 688ac3d commit 76f548b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ LayoutProps) {
const { dialogIsOpen } = useGlobalDialog();
const pathname = pathnameForSEO ? pathnameForSEO : router.pathname === '/' ? '' : router.pathname;
const lang = router.locale;
const shouldShowBanner = pathname === '' && dialogIsOpen(GlobalDialog.TopBanner);
const shouldShowBanner = !EXCLUDED_PATHS_FOR_BANNER.includes(pathname) && dialogIsOpen(GlobalDialog.TopBanner);

const snigelBanners = PATHS_WITH_CUSTOM_SNIGEL_BANNERS.includes(pathname)
? [...SNIGEL_BANNERS.DEFAULT_BANNERS, ...SNIGEL_BANNERS.CUSTOM_BANNERS]
Expand Down
1 change: 0 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const COOKIE_DOMAIN = 'internxt.com';
export const IMPACT_LOGIN_USER = 'https://app.impact.com/login.user';

export const EXCLUDED_PATHS_FOR_BANNER = [
'/lifetime',
'/pricing',
'/partner-discount',
'/techradar-discount',
Expand Down
4 changes: 2 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ function MyApp({ Component, pageProps }: AppProps) {
},
{
key: GlobalDialog.PriceBannerForCampaigns,
isOpen: false,
isOpen: true,
},
{
key: GlobalDialog.MobileBannerForHome,
isOpen: true,
},
{
key: GlobalDialog.TopBanner,
isOpen: false,
isOpen: true,
},
{
key: GlobalDialog.BottomBanner,
Expand Down

0 comments on commit 76f548b

Please sign in to comment.