Welcome to the IceRPC documentation! You will find on this site a
diff --git a/components/analytics/analytics.tsx b/components/analytics/analytics.tsx
index a6867571..82ec3ab7 100644
--- a/components/analytics/analytics.tsx
+++ b/components/analytics/analytics.tsx
@@ -26,13 +26,13 @@ export function Analytics() {
setEnableAnalytics(cookieValue === 'true' ? true : false);
}, [cookieValue]);
- const handleSetCookieSettings = (value: boolean) => {
+ const handleSetCookieSettings = async (value: boolean) => {
setShowCookieButton(false);
setShowBanner(false);
setEnableAnalytics(value === true);
// Safari workaround to keep the cookie stored for more than 7 days
- fetch(`api/cookies?allow-cookies=${encodeURIComponent(value)}`);
+ await fetch(`api/cookies?allow-cookies=${encodeURIComponent(value)}`);
};
const toggleShowBanner = () => setShowBanner(!showBanner);
diff --git a/components/analytics/banner.tsx b/components/analytics/banner.tsx
index dab5eea7..cb0cb925 100644
--- a/components/analytics/banner.tsx
+++ b/components/analytics/banner.tsx
@@ -1,11 +1,11 @@
// Copyright (c) ZeroC, Inc.
-import { motion } from 'framer-motion';
+import { motion, Variants } from 'framer-motion';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faXmarkCircle } from '@fortawesome/free-solid-svg-icons';
// Constants
-const bannerVariants = {
+const bannerVariants: Variants = {
hidden: { opacity: 0, scale: 0.5, y: 50 },
visible: {
opacity: 1,
@@ -36,7 +36,7 @@ export const Banner = ({
}: BannerProps) => (
+
-