Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidUpdate(prevProps, prevState) {
// Parse server errors for account add
if (get(prevProps, 'lockupError') !== this.props.lockupError) {
this.handleServerError(this.props.lockupError)
}
if (prevState.modalState !== this.state.modalState) {
ReactGA.modalview(`/lockup/${this.state.modalState.toLowerCase()}`)
}
}
componentDidUpdate(prevProps, prevState) {
// Parse server errors for account add
if (get(prevProps, 'accountError') !== this.props.accountError) {
this.handleServerError(this.props.accountError)
}
// Parse server errors for transfer add
if (get(prevProps, 'transferError') !== this.props.transferError) {
this.handleServerError(this.props.transferError)
}
if (prevState.modalState !== this.state.modalState) {
ReactGA.modalview(`/withdraw/${this.state.modalState.toLowerCase()}`)
}
}
constructor(props) {
super(props);
this.props = props;
GA.modalview('/info');
}
modalview: (modalName) => {
GoogleAnalytics.modalview(modalName);
},
event: (args) => {
showModal: function(modalClass, modalProps) {
ga.modalview(modalClass.displayName);
this.context.showModal(modalClass, modalProps);
},
hideModal: function() {
componentDidMount() {
ReactGA.modalview(`/lockup/${this.state.modalState.toLowerCase()}`)
}
componentDidMount() {
ReactGA.modalview(`/withdraw/${this.state.modalState.toLowerCase()}`)
}
function Modal({
children,
className,
isOpen,
onRequestClose,
screenReaderLabel,
shouldCloseOnOverlayClick,
}) {
if (process.env.NODE_ENV === 'production') {
ReactGA.modalview(screenReaderLabel);
}
return (
<div>{children}</div>
);
}
export function trackDialogView(name: string) {
if (EnvChecker.isProdBrowser()) {
ReactGA.modalview(name);
}
}
componentDidUpdate(prevProps, prevState) {
if (get(prevProps, 'otcError') !== this.props.otcError) {
this.handleServerError(this.props.otcError)
}
if (prevState.modalState !== this.state.modalState) {
ReactGA.modalview(`/otcRequest/${this.state.modalState.toLowerCase()}`)
}
}