From 546039594db2bd1bc430c52a1898177096e8e6fa Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Mon, 23 Nov 2026 23:25:26 +0900 Subject: [PATCH] refactor(components/ToastProvider): remove 'durationMs' and numeric 'id' left from Sonner --- src/components/ToastProvider.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/ToastProvider.tsx b/src/components/ToastProvider.tsx index 3e5af8d0a..944ef0060 100644 --- a/src/components/ToastProvider.tsx +++ b/src/components/ToastProvider.tsx @@ -3,8 +3,7 @@ import * as React from 'react' import styles from './ToastProvider.module.css' type ToastOptions = { - durationMs?: number - id?: number | string + id?: string } type ToastContextValue = { @@ -37,11 +36,10 @@ function ToastNotifications({ children }: ToastProviderProps) { const { add, toasts } = Toast.useToastManager() const notify = React.useCallback( - (content: React.ReactNode, { durationMs, id }: ToastOptions = {}) => + (content: React.ReactNode, { id }: ToastOptions = {}) => add({ title: content, - timeout: durationMs === Infinity ? 0 : durationMs, - id: id?.toString(), + id, }), [add], )