From 1baea5c7301bdc6cc7c90371b491732e25830ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorien=20Gr=C3=B6nwald?= Date: Sun, 23 Jun 2024 09:52:30 +0200 Subject: [PATCH] fix: do not set cookie on mobile screens --- src/tsx/components/homepage/HomepageHero.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tsx/components/homepage/HomepageHero.tsx b/src/tsx/components/homepage/HomepageHero.tsx index 270e0c8..cab37dd 100644 --- a/src/tsx/components/homepage/HomepageHero.tsx +++ b/src/tsx/components/homepage/HomepageHero.tsx @@ -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();