aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/shared/anchor_title.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-28 12:08:08 +0800
committerFabio Berger <me@fabioberger.com>2017-11-28 12:08:08 +0800
commit5a59ac4c6b9068fa55168bb072ee782cf3c7cd91 (patch)
tree89f29601440e401dace6a4ab9886fa608aa1bf20 /packages/website/ts/pages/shared/anchor_title.tsx
parent0a19ba3014ac68c1c94fcb376bc1ddb5081db757 (diff)
downloaddexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar.gz
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar.bz2
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar.lz
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar.xz
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.tar.zst
dexon-sol-tools-5a59ac4c6b9068fa55168bb072ee782cf3c7cd91.zip
fix remaining tslint errors
Diffstat (limited to 'packages/website/ts/pages/shared/anchor_title.tsx')
-rw-r--r--packages/website/ts/pages/shared/anchor_title.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/packages/website/ts/pages/shared/anchor_title.tsx b/packages/website/ts/pages/shared/anchor_title.tsx
index dfa9401ae..0a3674fd9 100644
--- a/packages/website/ts/pages/shared/anchor_title.tsx
+++ b/packages/website/ts/pages/shared/anchor_title.tsx
@@ -1,8 +1,8 @@
import * as React from 'react';
-import {Styles, HeaderSizes} from 'ts/types';
-import {utils} from 'ts/utils/utils';
-import {constants} from 'ts/utils/constants';
import {Link as ScrollLink} from 'react-scroll';
+import {HeaderSizes, Styles} from 'ts/types';
+import {constants} from 'ts/utils/constants';
+import {utils} from 'ts/utils/utils';
const headerSizeToScrollOffset: {[headerSize: string]: number} = {
h2: -20,
@@ -59,11 +59,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
public render() {
let opacity = 0;
if (this.props.shouldShowAnchor) {
- if (this.state.isHovering) {
- opacity = 0.6;
- } else {
- opacity = 1;
- }
+ opacity = this.state.isHovering ? 0.6 : 1;
}
return (
<div className="relative flex" style={{...styles[this.props.headerSize], ...styles.headers}}>