diff --git a/web/src/features/token/token-list.tsx b/web/src/features/token/token-list.tsx
index 7625cd58..db2ee3c3 100644
--- a/web/src/features/token/token-list.tsx
+++ b/web/src/features/token/token-list.tsx
@@ -240,7 +240,7 @@ export function TokenList() {
variant="outline"
size="sm"
onClick={() => handleCopyToken(token.id)}
- title={createdTokens[token.id] ? t('token.copy') : t('token.copyUnavailableTitle')}
+ aria-label={createdTokens[token.id] ? t('token.copy') : t('token.copyUnavailableTitle')}
>
{t('token.copy')}
diff --git a/web/src/shared/components/toaster.tsx b/web/src/shared/components/toaster.tsx
index bd6d3543..b405dae2 100644
--- a/web/src/shared/components/toaster.tsx
+++ b/web/src/shared/components/toaster.tsx
@@ -3,43 +3,27 @@ import { CENTER_TOASTER_ID } from '@/shared/lib/toast'
export function Toaster() {
return (
- <>
-
-
- >
+
)
}
diff --git a/web/src/shared/lib/toast.ts b/web/src/shared/lib/toast.ts
index ce2a09e0..8a9254f3 100644
--- a/web/src/shared/lib/toast.ts
+++ b/web/src/shared/lib/toast.ts
@@ -14,18 +14,25 @@ export function centeredToastOptions(options?: ExternalToast): ExternalToast {
}
}
+function withDefaultToaster(options?: ExternalToast): ExternalToast {
+ return {
+ toasterId: CENTER_TOASTER_ID,
+ ...options,
+ }
+}
+
export const toast = {
success: (message: string, description?: string, options?: ExternalToast) => {
- sonnerToast.success(message, { description, ...options })
+ sonnerToast.success(message, { description, ...withDefaultToaster(options) })
},
error: (message: string, description?: string, options?: ExternalToast) => {
- sonnerToast.error(message, { description, ...options })
+ sonnerToast.error(message, { description, ...withDefaultToaster(options) })
},
warning: (message: string, description?: string, options?: ExternalToast) => {
- sonnerToast.warning(message, { description, ...options })
+ sonnerToast.warning(message, { description, ...withDefaultToaster(options) })
},
info: (message: string, description?: string, options?: ExternalToast) => {
- sonnerToast.info(message, { description, ...options })
+ sonnerToast.info(message, { description, ...withDefaultToaster(options) })
},
promise: (
promise: Promise,
@@ -35,6 +42,6 @@ export const toast = {
error: string | ((error: Error) => string)
}
) => {
- return sonnerToast.promise(promise, options)
+ return sonnerToast.promise(promise, { ...options, toasterId: CENTER_TOASTER_ID })
},
}