From b63fbc5345abfc9bf1d0cb611da3dc013905af1a Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 30 Oct 2024 13:00:16 -0700 Subject: [PATCH] Add a simple badget to the dropdown menu that shows subscription status --- .../web/app/components/navMenu/navMenu.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/interface/web/app/components/navMenu/navMenu.tsx b/src/interface/web/app/components/navMenu/navMenu.tsx index 2ff4eaf4..256c7d77 100644 --- a/src/interface/web/app/components/navMenu/navMenu.tsx +++ b/src/interface/web/app/components/navMenu/navMenu.tsx @@ -26,6 +26,17 @@ import { Moon, Sun, UserCircle, Question, GearFine, ArrowRight } from "@phosphor import { KhojAgentLogo, KhojAutomationLogo, KhojSearchLogo } from "../logo/khojLogo"; import { useIsMobileWidth } from "@/app/common/utils"; +function SubscriptionBadge({ is_active }: { is_active: boolean }) { + return ( +
+
+

{is_active ? "Futurist" : "Free"}

+
+ ); +} + export default function NavMenu() { const userData = useAuthenticatedData(); const [darkMode, setDarkMode] = useState(false); @@ -85,8 +96,9 @@ export default function NavMenu() { -
+

{userData?.email}

+
@@ -192,8 +204,9 @@ export default function NavMenu() { -
+

{userData?.email}

+