From 665524109137eb8bb2567f15871c10089d3257e7 Mon Sep 17 00:00:00 2001 From: Magnus-SmariSma <20734986-Magnus-SmariSma@users.noreply.replit.com> Date: Thu, 20 Mar 2025 23:18:18 +0000 Subject: [PATCH] Add IUCN token support to authentication and API status display. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e931b5ab-041b-42e7-baf1-50017869cef6 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/e19c6a51-7e4c-4bb8-a6a6-46dc00f0ec99/39e3c295-bd5c-43f6-a0a9-90e6a0a94d73.jpg --- client/src/components/authentication-panel.tsx | 5 +++-- client/src/pages/home.tsx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/components/authentication-panel.tsx b/client/src/components/authentication-panel.tsx index b719aef..ca2f38d 100644 --- a/client/src/components/authentication-panel.tsx +++ b/client/src/components/authentication-panel.tsx @@ -11,13 +11,14 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; interface AuthenticationPanelProps { token: string; + iucnToken?: string; onSave: () => void; } -export default function AuthenticationPanel({ token, onSave }: AuthenticationPanelProps) { +export default function AuthenticationPanel({ token, iucnToken: initialIucnToken, onSave }: AuthenticationPanelProps) { const { toast } = useToast(); const [citesToken, setCitesToken] = useState(token || ""); - const [iucnToken, setIucnToken] = useState(""); + const [iucnToken, setIucnToken] = useState(initialIucnToken || ""); const [activeTab, setActiveTab] = useState("cites"); // Fetch both tokens from the server diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 1acaf64..fb8f600 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -94,7 +94,10 @@ export default function Home() {

CITES+ Species Lookup

- +
@@ -127,6 +130,7 @@ export default function Home() { {showAuthPanel && ( setShowAuthPanel(false)} /> )}