Replace remaining scroll-links with Link component

This commit is contained in:
Fabio Berger
2018-11-11 17:51:00 +01:00
parent 2d43f312c8
commit 0d201173ef
2 changed files with 5 additions and 24 deletions

View File

@@ -3,7 +3,6 @@ import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
import { errorUtils } from '@0x/utils';
import * as _ from 'lodash';
import * as React from 'react';
import { Link as ScrollLink } from 'react-scroll';
import * as ReactTooltip from 'react-tooltip';
import { DocsInfo } from '../docs_info';
@@ -224,13 +223,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
{sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? (
<span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span>
) : (
<ScrollLink
to={typeDefinitionAnchorId}
offset={0}
hashSpy={true}
duration={sharedConstants.DOCS_SCROLL_DURATION_MS}
containerId={sharedConstants.SCROLL_CONTAINER_ID}
>
<Link to={typeDefinitionAnchorId}>
<span
data-tip={true}
data-for={id}
@@ -252,7 +245,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
/>
</ReactTooltip>
</span>
</ScrollLink>
</Link>
)}
</span>
);