diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-14 17:30:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-14 17:30:51 +0800 |
commit | c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6 (patch) | |
tree | 986b220cf80aab8d8e8ef6c4cef8c08be6eeab10 /packages/react-shared/src/components/markdown_link_block.tsx | |
parent | 7d60356facce60c1d4d80c703bfc565c5c47e73b (diff) | |
parent | 58fa35641d3016ef106496c929e48febcf827dc6 (diff) | |
download | dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.gz dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.bz2 dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.lz dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.xz dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.zst dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.zip |
Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
Add missing type definitions
Diffstat (limited to 'packages/react-shared/src/components/markdown_link_block.tsx')
-rw-r--r-- | packages/react-shared/src/components/markdown_link_block.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/react-shared/src/components/markdown_link_block.tsx b/packages/react-shared/src/components/markdown_link_block.tsx index 8f5862249..0b489b749 100644 --- a/packages/react-shared/src/components/markdown_link_block.tsx +++ b/packages/react-shared/src/components/markdown_link_block.tsx @@ -13,10 +13,10 @@ export interface MarkdownLinkBlockState {} export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, MarkdownLinkBlockState> { // Re-rendering a linkBlock causes it to remain unclickable. // We therefore noop re-renders on this component if it's props haven't changed. - public shouldComponentUpdate(nextProps: MarkdownLinkBlockProps, nextState: MarkdownLinkBlockState) { + public shouldComponentUpdate(nextProps: MarkdownLinkBlockProps, nextState: MarkdownLinkBlockState): boolean { return nextProps.href !== this.props.href; } - public render() { + public render(): React.ReactNode { const href = this.props.href; const isLinkToSection = _.startsWith(href, '#'); // If protocol is http or https, we can open in a new tab, otherwise don't for security reasons @@ -39,7 +39,7 @@ export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, M return <a href={href}>{this.props.children}</a>; } } - private _onHashUrlClick(href: string) { + private _onHashUrlClick(href: string): void { const hash = href.split('#')[1]; utils.scrollToHash(hash, constants.SCROLL_CONTAINER_ID); utils.setUrlHash(hash); |