diff --git a/apps/docs/components/IPv4DeprecationBanner.tsx b/apps/docs/components/IPv4DeprecationBanner.tsx index edd085f6d63..b42344d01a7 100644 --- a/apps/docs/components/IPv4DeprecationBanner.tsx +++ b/apps/docs/components/IPv4DeprecationBanner.tsx @@ -1,30 +1,9 @@ import Link from 'next/link' -import { memo, useEffect, useReducer } from 'react' +import { memo } from 'react' import { Button, IconExternalLink, cn } from 'ui' -import { LOCAL_STORAGE_KEYS, retrieve, store } from '~/lib/storage' - -const DISMISSAL_STORAGE_KEY = LOCAL_STORAGE_KEYS.IPV4_DEPRECATION_DISMISSAL - -function changeBannerVsibility(_, isVisible: boolean) { - if (isVisible) { - return true - } - store('local', DISMISSAL_STORAGE_KEY, 'true') - return false -} - export const IPv4DeprecationBanner = memo(() => { - const [isBannerVisible, setIsBannerVisible] = useReducer(changeBannerVsibility, false) - - useEffect(() => { - const acknowledged = retrieve('local', DISMISSAL_STORAGE_KEY) === 'true' - if (!acknowledged) setIsBannerVisible(true) - }, []) - - if (!isBannerVisible) return null - return (
@@ -44,14 +23,6 @@ export const IPv4DeprecationBanner = memo(() => { > Learn more -