From 7a466746e3eb56953d83738924ea4210928164a0 Mon Sep 17 00:00:00 2001 From: Janith Rathnayaka Date: Mon, 15 Apr 2024 14:47:46 +0530 Subject: [PATCH] cookie-consent mobile reponsive --- ui/components/cookie-consent.tsx | 66 ++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/ui/components/cookie-consent.tsx b/ui/components/cookie-consent.tsx index d576be87f..33bba14fb 100644 --- a/ui/components/cookie-consent.tsx +++ b/ui/components/cookie-consent.tsx @@ -1,37 +1,45 @@ -import { useState, useEffect } from 'react'; +import { useState, useEffect } from "react"; const CookieConsent = () => { - const [isVisible, setIsVisible] = useState(false); + const [isVisible, setIsVisible] = useState(false); - useEffect(() => { - const cookieConsent = localStorage.getItem('cookieConsent'); - if (!cookieConsent) { - setIsVisible(true); - } - }, []); + useEffect(() => { + const cookieConsent = localStorage.getItem("cookieConsent"); + if (!cookieConsent) { + setIsVisible(true); + } + }, []); - const handleAccept = () => { - localStorage.setItem('cookieConsent', 'true'); - setIsVisible(false); - }; + const handleAccept = () => { + localStorage.setItem("cookieConsent", "true"); + setIsVisible(false); + }; - if (!isVisible) return null; + if (!isVisible) return null; - return ( -
-
{/* Adjust max-width accordingly */} -

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.

-
-
- - - Cookie Settings - -
-
- ); + return ( +
+
+

+ We use cookies on our website to give you the most relevant experience + by remembering your preferences and repeat visits. By clicking “Accept + All”, you consent to the use of ALL the cookies. However, you may + visit "Cookie Settings" to provide a controlled consent. +

+
+
+ + + Cookie Settings + +
+
+ ); }; -export default CookieConsent; \ No newline at end of file +export default CookieConsent;