Skip to content

Commit

Permalink
fix: do not set cookie on mobile screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorien Grönwald committed Jun 23, 2024
1 parent 99fca3a commit 1baea5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tsx/components/homepage/HomepageHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ function HomepageHero() {
}, [isOverlayVisible]);

useEffect(() => {
if (! hasCookie('green_ecolution_initial_load') && ! isOverlayVisible) {
if (! hasCookie('green_ecolution_initial_load')
&& ! isOverlayVisible
&& window.matchMedia('(min-width: 1280px)').matches
) {
setIsInitialLoad(true);
bodyLock();

Expand Down

0 comments on commit 1baea5c

Please sign in to comment.