Skip to content

Commit

Permalink
[#develop] Remove unnecessary casting
Browse files Browse the repository at this point in the history
  • Loading branch information
myeongjae-kim committed Sep 8, 2019
1 parent 2a1df1d commit 3528089
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -52,7 +52,7 @@ class SnackbarContainer extends React.Component<Props> {
// 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
<IconButton key="close" color="inherit" onClick={() => this.props.closeSnackbar(keyToDismiss)}>
Expand Down

0 comments on commit 3528089

Please sign in to comment.