From e62c4823f974985a1819ef89841b89962cdccb12 Mon Sep 17 00:00:00 2001 From: Felix Habib Date: Wed, 23 Oct 2024 09:18:40 +1100 Subject: [PATCH] Fix local dev bug --- .../src/lib/components/useToast/useTimeout.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/braid-design-system/src/lib/components/useToast/useTimeout.ts b/packages/braid-design-system/src/lib/components/useToast/useTimeout.ts index 4869d27fea7..cb5c720b861 100644 --- a/packages/braid-design-system/src/lib/components/useToast/useTimeout.ts +++ b/packages/braid-design-system/src/lib/components/useToast/useTimeout.ts @@ -15,6 +15,7 @@ export const useTimeout = ({ onTimeout, duration }: UseTimeoutProps) => { useEffect(() => { if (activated) { + setActivated(true); timeoutRef.current = window.setTimeout(() => { onTimeout(); }, duration);