From 0019b982e0aeddc3759c4926d3f1e3a54be4ff6c Mon Sep 17 00:00:00 2001 From: Ivan Evans <74743263+Pasithea0@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:24:18 -0700 Subject: [PATCH] Update popup for new server --- src/components/layout/Navigation.tsx | 2 + src/pages/HomePage.tsx | 127 +++++++++++++++---- src/pages/parts/home/PopupModal.tsx | 21 ++- src/pages/parts/settings/ConnectionsPart.tsx | 14 +- 4 files changed, 131 insertions(+), 33 deletions(-) diff --git a/src/components/layout/Navigation.tsx b/src/components/layout/Navigation.tsx index 92ebefa4..7d4355ab 100644 --- a/src/components/layout/Navigation.tsx +++ b/src/components/layout/Navigation.tsx @@ -101,6 +101,7 @@ export function Navigation(props: NavigationProps) { > + {/* handleClick("/discover")} rel="noreferrer" @@ -108,6 +109,7 @@ export function Navigation(props: NavigationProps) { > + */}
diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 79b5f582..eeebb7dc 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -2,6 +2,8 @@ import { useEffect, useState } from "react"; import { Helmet } from "react-helmet-async"; import { useTranslation } from "react-i18next"; +import { Icons } from "@/components/Icon"; +import { IconPill } from "@/components/layout/IconPill"; import { Loading } from "@/components/layout/Loading"; import { WideContainer } from "@/components/layout/WideContainer"; import { useDebounce } from "@/hooks/useDebounce"; @@ -65,6 +67,8 @@ export function HomePage() { simulateLoading(); }, []); + /* + // Safari Notice const [showModal, setShowModal] = useState(() => { const isSafari = typeof navigator !== "undefined" && @@ -80,9 +84,34 @@ export function HomePage() { return isSafari && (isMac || isIOS); }); + */ + + // One time notice + const [showModal, setShowModal] = useState(false); + + useEffect(() => { + const isDismissed = localStorage.getItem("popupDismissed"); + if (!isDismissed) { + setShowModal(true); + } + }, []); + + const handleCloseModal = () => { + setShowModal(false); + localStorage.setItem("popupDismissed", "true"); + }; return ( + setShowModal(true)} + className="text-l lg:text-lg text-white tabbable rounded-full z-50 fixed top-5 right-[7.5rem]" + style={{ animation: "pulse 1s infinite" }} + > + + READ + +