Skip to content

Commit f0603fa

Browse files
committed
close toast when entering details
1 parent 41188f9 commit f0603fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/compass-import-export/src/components/import-toast.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import {
33
Body,
4+
closeToast,
45
css,
56
Link,
67
openToast,
@@ -233,7 +234,10 @@ export function showFailedToast(
233234
{err?.message} 
234235
{showErrorDetails && (
235236
<Link
236-
onClick={showErrorDetails}
237+
onClick={() => {
238+
showErrorDetails();
239+
closeToast(importToastId);
240+
}}
237241
data-testid="import-error-details-button"
238242
>
239243
View error details

0 commit comments

Comments
 (0)