From 3528089bb248112ee00863988e061897226c8a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Myeongjae=20Kim=20=E1=84=80=E1=85=B5=E1=86=B7=E1=84=86?= =?UTF-8?q?=E1=85=A7=E1=86=BC=E1=84=8C=E1=85=A2?= Date: Mon, 9 Sep 2019 00:27:12 +0900 Subject: [PATCH] [#develop] Remove unnecessary casting --- .../presentation/container/molecules/SnackbarContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/presentation/container/molecules/SnackbarContainer.tsx b/src/common/presentation/container/molecules/SnackbarContainer.tsx index 8af9885..2dfe707 100644 --- a/src/common/presentation/container/molecules/SnackbarContainer.tsx +++ b/src/common/presentation/container/molecules/SnackbarContainer.tsx @@ -1,6 +1,6 @@ import { IconButton } from '@material-ui/core'; import { Close } from '@material-ui/icons'; -import { OptionsObject, withSnackbar, WithSnackbarProps } from 'notistack'; +import { withSnackbar, WithSnackbarProps } from 'notistack'; import * as React from 'react'; import { WithTranslation } from 'react-i18next'; import { connect } from 'react-redux'; @@ -52,7 +52,7 @@ class SnackbarContainer extends React.Component { // Display snackbar using notistack this.props.enqueueSnackbar(t(message, messageOptions), { ...options, - persist: (options as OptionsObject).variant === "error" ? true : false, + persist: options.variant === "error" ? true : false, action: keyToDismiss => ( // tslint:disable-next-line: jsx-no-lambda this.props.closeSnackbar(keyToDismiss)}>