diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-21 00:59:13 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-21 00:59:13 +0800 |
commit | f94bdc496a7daa94534446b15d688ac24e038485 (patch) | |
tree | 54d807f5b706e3b5ad0091d615e6a6f0c488e8a9 /packages | |
parent | 97369c969ce87695af7d0c0a86182e283f0cd726 (diff) | |
download | dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar.gz dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar.bz2 dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar.lz dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar.xz dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.tar.zst dexon-sol-tools-f94bdc496a7daa94534446b15d688ac24e038485.zip |
Rename props and fix router types
Diffstat (limited to 'packages')
-rw-r--r-- | packages/website/ts/@next/components/blockIconLink.tsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/website/ts/@next/components/blockIconLink.tsx b/packages/website/ts/@next/components/blockIconLink.tsx index bdcc5c29d..8d66a4afa 100644 --- a/packages/website/ts/@next/components/blockIconLink.tsx +++ b/packages/website/ts/@next/components/blockIconLink.tsx @@ -1,20 +1,24 @@ +import { History, Location } from 'history'; import * as React from 'react'; -import { withRouter } from 'react-router-dom'; +import { match, withRouter } from 'react-router-dom'; import styled from 'styled-components'; import { Button } from 'ts/@next/components/button'; import { Icon } from 'ts/@next/components/icon'; -interface Props { +interface BaseComponentProps { icon?: string; iconComponent?: React.ReactNode; title: string; linkLabel: string; linkUrl?: string; linkAction?: () => void; + history: History; + location: Location; + match: match<any>; } -class BaseComponent extends React.PureComponent<Props> { +class BaseComponent extends React.PureComponent<BaseComponentProps> { public onClick = (): void => { const { linkAction, linkUrl } = this.props; @@ -44,7 +48,7 @@ class BaseComponent extends React.PureComponent<Props> { } } -export const BlockIconLink = withRouter(BaseComponent); +export const BlockIconLink = withRouter<BaseComponentProps>(BaseComponent); const Wrap = styled.div` width: calc(50% - 15px); |