aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-21 00:59:13 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-21 00:59:13 +0800
commitf94bdc496a7daa94534446b15d688ac24e038485 (patch)
tree54d807f5b706e3b5ad0091d615e6a6f0c488e8a9 /packages/website/ts/@next
parent97369c969ce87695af7d0c0a86182e283f0cd726 (diff)
downloaddexon-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/website/ts/@next')
-rw-r--r--packages/website/ts/@next/components/blockIconLink.tsx12
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);