diff --git a/src/app/components/FlashMessage.js b/src/app/components/FlashMessage.js index 25e8ccd197..847bda73a0 100644 --- a/src/app/components/FlashMessage.js +++ b/src/app/components/FlashMessage.js @@ -63,9 +63,7 @@ const FlashMessageProviderWithSnackBar = withSnackbar(({ children, enqueueSnackb content={msg} floating variant={variant} - onClose={persist ? () => { - closeSnackbar(key); - } : null} + onClose={() => { closeSnackbar(key); }} /> ), @@ -89,9 +87,7 @@ const FlashMessageProviderWithSnackBar = withSnackbar(({ children, enqueueSnackb floating title={<>{createFriendlyErrorMessageTitle(msg)}} variant={variant} - onClose={persist ? () => { - closeSnackbar(key); - } : null} + onClose={() => { closeSnackbar(key); }} /> ), @@ -114,9 +110,7 @@ const FlashMessageProviderWithSnackBar = withSnackbar(({ children, enqueueSnackb content={message} floating variant={variant} - onClose={persist ? () => { - closeSnackbar(key); - } : null} + onClose={() => { closeSnackbar(key); }} /> ),