aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-04 23:47:58 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-04 23:47:58 +0800
commitae9614ba36e79bb6dd6421f368dec1ef22e5756a (patch)
treea49f7e2310a9cc33a2d577c291b847dd50b1352f /packages/website
parent871ec6cfbc778d3090f108fc349d4cda77a81cf6 (diff)
downloaddexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar.gz
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar.bz2
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar.lz
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar.xz
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.tar.zst
dexon-sol-tools-ae9614ba36e79bb6dd6421f368dec1ef22e5756a.zip
Fixes Link component to user ReactRouterLink
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/@next/components/button.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/website/ts/@next/components/button.tsx b/packages/website/ts/@next/components/button.tsx
index 1e59ae9c2..bd7f07d99 100644
--- a/packages/website/ts/@next/components/button.tsx
+++ b/packages/website/ts/@next/components/button.tsx
@@ -1,6 +1,5 @@
-import { History } from 'history';
import * as React from 'react';
-import { withRouter } from 'react-router-dom';
+import { Link as ReactRouterLink, withRouter } from 'react-router-dom';
import styled from 'styled-components';
import { colors } from 'ts/style/colors';
@@ -15,7 +14,6 @@ interface ButtonInterface {
isInline?: boolean;
href?: string;
onClick?: () => any;
- history?: History;
theme?: {
textColor: string;
};
@@ -37,14 +35,12 @@ export const Button = styled.button<ButtonInterface>`
export const Link = withRouter((props: ButtonInterface) => {
const {
children,
- history,
href,
} = props;
- const Component = Button.withComponent('a');
- const handleClick = () => history.push(href);
+ const Component = Button.withComponent(ReactRouterLink);
return (
- <Component onClick={handleClick} {...props}>
+ <Component to={href} {...props}>
{children}
</Component>
);