diff --git a/frontend/App.tsx b/frontend/App.tsx index a01bfa0..2eb7c8f 100755 --- a/frontend/App.tsx +++ b/frontend/App.tsx @@ -83,7 +83,13 @@ const AppContent: React.FC<{ msalInstance: any }> = ({ msalInstance }) => { const [selectedCampaign, setSelectedCampaign] = useState(initialUrlState.campaignName); const [selectedProof, setSelectedProof] = useState(null); const [pendingProofId, setPendingProofId] = useState(initialUrlState.proofId); - const [error, setError] = useState(null); + const [error, setErrorState] = useState(null); + const errorTimerRef = React.useRef | null>(null); + const setError = (msg: string | null) => { + setErrorState(msg); + if (errorTimerRef.current) clearTimeout(errorTimerRef.current); + if (msg) errorTimerRef.current = setTimeout(() => setErrorState(null), 8000); + }; const [isLoadingData, setIsLoadingData] = useState(true); const [notification, setNotification] = useState(null); const notificationTimerRef = React.useRef | null>(null); @@ -981,6 +987,21 @@ const AppContent: React.FC<{ msalInstance: any }> = ({ msalInstance }) => { + {/* Error toast */} + {error && ( +
+ + + +

{error}

+ +
+ )} + {/* Model fallback notification toast */} {notification && (
diff --git a/frontend/components/Campaigns.tsx b/frontend/components/Campaigns.tsx index 366fee9..577136d 100755 --- a/frontend/components/Campaigns.tsx +++ b/frontend/components/Campaigns.tsx @@ -1673,7 +1673,7 @@ const ProofDetailView: React.FC<{ } return ( -
+