From 37c42be85f57f6289cab0e8f4aadbd7ecbd3ce88 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 23 Dec 2025 12:00:43 +0000 Subject: [PATCH] Polish: refactor UnifiedAgents to use notificationStore --- .../src/components/Settings/UnifiedAgents.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend-modern/src/components/Settings/UnifiedAgents.tsx b/frontend-modern/src/components/Settings/UnifiedAgents.tsx index 68d68b5ac..f7c592b8b 100644 --- a/frontend-modern/src/components/Settings/UnifiedAgents.tsx +++ b/frontend-modern/src/components/Settings/UnifiedAgents.tsx @@ -741,8 +741,10 @@ export const UnifiedAgents: Component = () => { type="button" onClick={async () => { const success = await copyToClipboard(getUninstallCommand()); - if (typeof window !== 'undefined' && window.showToast) { - window.showToast(success ? 'success' : 'error', success ? 'Copied!' : 'Failed'); + if (success) { + notificationStore.success('Copied to clipboard'); + } else { + notificationStore.error('Failed to copy'); } }} class="absolute top-2 right-2 p-1.5 text-gray-400 hover:text-gray-200 bg-gray-700/50 hover:bg-gray-700 rounded-md transition-colors" @@ -791,8 +793,10 @@ export const UnifiedAgents: Component = () => { type="button" onClick={async () => { const success = await copyToClipboard(getUpgradeCommand('')); - if (typeof window !== 'undefined' && window.showToast) { - window.showToast(success ? 'success' : 'error', success ? 'Copied!' : 'Failed to copy'); + if (success) { + notificationStore.success('Copied to clipboard'); + } else { + notificationStore.error('Failed to copy'); } }} class="absolute top-2 right-2 p-1.5 text-amber-700/60 hover:text-amber-900 bg-amber-200/50 hover:bg-amber-300/50 rounded-md transition-colors dark:text-amber-400 dark:hover:text-amber-200 dark:bg-amber-800/50 dark:hover:bg-amber-700/50"