diff --git a/messages/en-US.json b/messages/en-US.json index 3466edf4..d5521aec 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1281,6 +1281,7 @@ "sidebarExpand": "Expand", "productUpdateMoreInfo": "{noOfUpdates} more updates", "productUpdateInfo": "{noOfUpdates} updates", + "productUpdateWhatsNew": "What's New", "pangolinUpdateAvailable": "New version available", "pangolinUpdateAvailableInfo": "Version {version} is ready to install", "pangolinUpdateAvailableReleaseNotes": "View release notes", diff --git a/src/components/ProductUpdates.tsx b/src/components/ProductUpdates.tsx index b0b3530a..6243cf88 100644 --- a/src/components/ProductUpdates.tsx +++ b/src/components/ProductUpdates.tsx @@ -5,9 +5,15 @@ import { useLocalStorage } from "@app/hooks/useLocalStorage"; import { cn } from "@app/lib/cn"; import { type ProductUpdate, productUpdatesQueries } from "@app/lib/queries"; import { useQueries } from "@tanstack/react-query"; -import { ArrowRight, BellIcon, ChevronRightIcon, XIcon } from "lucide-react"; +import { + ArrowRight, + BellIcon, + ChevronRightIcon, + RocketIcon, + XIcon +} from "lucide-react"; import { useTranslations } from "next-intl"; -import { Transition } from "@headlessui/react"; +import { Transition, TransitionChild } from "@headlessui/react"; import * as React from "react"; export default function ProductUpdates({ @@ -34,7 +40,7 @@ export default function ProductUpdates({ // we need to delay the initial React.useEffect(() => { - const timeout = setTimeout(() => setShowMoreUpdatesText(true), 500); + const timeout = setTimeout(() => setShowMoreUpdatesText(true), 600); return () => clearTimeout(timeout); }, []); @@ -42,62 +48,63 @@ export default function ProductUpdates({ string | null >("ignored-version", null); - const [showNewVersionPopup, setShowNewVersionPopup] = React.useState(true); - if (!data) return null; - // const showNewVersionPopup = Boolean( - // data?.latestVersion?.data && - // ignoredVersionUpdate !== - // data.latestVersion.data?.pangolin.latestVersion && - // env.app.version !== data.latestVersion.data?.pangolin.latestVersion - // ); + const showNewVersionPopup = Boolean( + data?.latestVersion?.data && + ignoredVersionUpdate !== + data.latestVersion.data?.pangolin.latestVersion && + env.app.version !== data.latestVersion.data?.pangolin.latestVersion + ); return (
What's new
+{t("productUpdateWhatsNew")}