From 19891c9e832bf550caa43fd603c9c935bb9a260b Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Wed, 15 Jan 2025 08:58:38 -0500 Subject: [PATCH 1/2] Don't use fixed footer --- .../src/components/layout/Content.tsx | 2 +- .../src/components/layout/footer/index.tsx | 26 ++----------------- .../keychain/src/components/slot/consent.tsx | 1 - 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/packages/keychain/src/components/layout/Content.tsx b/packages/keychain/src/components/layout/Content.tsx index 84882b37d..7ab19e3ff 100644 --- a/packages/keychain/src/components/layout/Content.tsx +++ b/packages/keychain/src/components/layout/Content.tsx @@ -8,7 +8,7 @@ export function Content({ return (
diff --git a/packages/keychain/src/components/layout/footer/index.tsx b/packages/keychain/src/components/layout/footer/index.tsx index 357e09619..b8cb6e2f8 100644 --- a/packages/keychain/src/components/layout/footer/index.tsx +++ b/packages/keychain/src/components/layout/footer/index.tsx @@ -1,4 +1,4 @@ -import { forwardRef, memo, PropsWithChildren, useEffect, useRef } from "react"; +import { forwardRef, memo, PropsWithChildren, useRef } from "react"; import { cn } from "@cartridge/ui-next"; import { Link } from "react-router-dom"; @@ -9,32 +9,10 @@ export function Footer({ }: PropsWithChildren & { className?: string; showCatridgeLogo?: boolean }) { const ref = useRef(null); - useEffect(() => { - if (!ref.current) { - document.documentElement.style.setProperty("--footer-height", "0px"); - return; - } - - const observer = new ResizeObserver((entries) => { - const rect = entries[0].contentRect; - if (!rect.height) return; - document.documentElement.style.setProperty( - "--footer-height", - `${rect.height + 16 * 2}px`, - ); - }); - - observer.observe(ref.current); - - return () => { - observer.disconnect(); - }; - }, []); - return (