diff --git a/src/components/ProductUpdates.tsx b/src/components/ProductUpdates.tsx index 81f1fdb4..75590c84 100644 --- a/src/components/ProductUpdates.tsx +++ b/src/components/ProductUpdates.tsx @@ -7,13 +7,12 @@ import { versionsQueries } from "@app/lib/queries"; import { useQuery } from "@tanstack/react-query"; import { ArrowRight, BellIcon, XIcon } from "lucide-react"; import { useTranslations } from "next-intl"; -import { useState } from "react"; interface ProductUpdatesProps {} export default function ProductUpdates({}: ProductUpdatesProps) { return ( -
+
{/* 3 more updates @@ -34,15 +33,16 @@ function NewVersionAvailable() { const showNewVersionPopup = version?.data && - ignoredVersionUpdate !== version.data.pangolin.latestVersion; + ignoredVersionUpdate !== version.data.pangolin.latestVersion && + env.app.version !== version.data.pangolin.latestVersion; + + if (!showNewVersionPopup) return null; return (
{version?.data && ( @@ -60,7 +60,7 @@ function NewVersionAvailable() { })} @@ -74,7 +74,7 @@ function NewVersionAvailable() { className="p-1 cursor-pointer" onClick={() => setIgnoredVersionUpdate( - version?.data?.pangolin.latestVersion ?? null + version.data?.pangolin.latestVersion ?? null ) } >