From 6da5fac1d1ab511819dd0482b712fd0e2f8cc9a9 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 28 Nov 2017 18:47:29 -0600 Subject: [PATCH] =?UTF-8?q?Update=20@types/history=20to=20the=20latest=20v?= =?UTF-8?q?ersion=20=F0=9F=9A=80=20(#389)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update @types/history to version 4.6.2 * Rework type to newly added history overrides. --- .../SendTransaction/components/NavigationPrompt.tsx | 12 ++++-------- package.json | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/common/containers/Tabs/SendTransaction/components/NavigationPrompt.tsx b/common/containers/Tabs/SendTransaction/components/NavigationPrompt.tsx index 9a965ee0..a3fdc446 100644 --- a/common/containers/Tabs/SendTransaction/components/NavigationPrompt.tsx +++ b/common/containers/Tabs/SendTransaction/components/NavigationPrompt.tsx @@ -1,13 +1,7 @@ import React from 'react'; import { withRouter } from 'react-router-dom'; import Modal, { IButton } from 'components/ui/Modal'; -import { Location, History as H } from 'history'; - -type UnregisterCallback = () => void; -type BooleanCallback = (arg?: any) => boolean; -interface History extends H { - block(prompt?: boolean | BooleanCallback): UnregisterCallback; -} +import { Location, History } from 'history'; interface Props { when: boolean; @@ -50,7 +44,9 @@ class NavigationPrompt extends React.Component { nextLocation }); } - return !this.props.when; + if (this.props.when) { + return false; + } }); } diff --git a/package.json b/package.json index de1884dc..54da109d 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "devDependencies": { "@types/classnames": "2.2.3", - "@types/history": "4.6.1", + "@types/history": "4.6.2", "@types/jest": "21.1.8", "@types/lodash": "4.14.86", "@types/qrcode": "0.8.0",