File tree 1 file changed +5
-1
lines changed
packages/beacon-ui/src/ui/toast
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const createToast = (config: ToastConfig) => {
17
17
}
18
18
19
19
const openToast = ( config : ToastConfig ) => {
20
+ console . error ( 'open toast called' , config )
20
21
initDone ? config$ . next ( config ) : createToast ( config )
21
22
22
23
if ( lastTimer ) {
@@ -25,7 +26,9 @@ const openToast = (config: ToastConfig) => {
25
26
}
26
27
27
28
lastTimer = config . timer ? setTimeout ( ( ) => show$ . next ( false ) , config . timer ) : undefined
28
- show$ . next ( true )
29
+
30
+ show$ . next ( false )
31
+ setTimeout ( ( ) => show$ . next ( true ) , 50 )
29
32
}
30
33
31
34
const closeToast = ( ) => {
@@ -54,6 +57,7 @@ const ToastRoot = (props: ToastConfig) => {
54
57
} , [ ] )
55
58
56
59
useEffect ( ( ) => {
60
+ console . error ( 'useEffect called' , config )
57
61
// unmount the component immediately
58
62
// if the close icon is clicked
59
63
// or whenever closeToast is called.
You can’t perform that action at this time.
0 commit comments