diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-03 01:46:36 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-03 01:46:36 -0500 |
| commit | ef94ad7df2a087141ddb8d347d3e3c484ff7609b (patch) | |
| tree | a7c16be04ff4050da1ff03e02f59df6da4f5f7e2 /src/client/views/search/NaviconButton.tsx | |
| parent | 62c888ad25c5580441eaf947a1a0f1638939b868 (diff) | |
const linter rule and restored google docs push, fixed routing
Diffstat (limited to 'src/client/views/search/NaviconButton.tsx')
| -rw-r--r-- | src/client/views/search/NaviconButton.tsx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client/views/search/NaviconButton.tsx b/src/client/views/search/NaviconButton.tsx index 3fa36b163..0fa4a0fca 100644 --- a/src/client/views/search/NaviconButton.tsx +++ b/src/client/views/search/NaviconButton.tsx @@ -4,7 +4,7 @@ import "./NaviconButton.scss"; import * as $ from 'jquery'; import { observable } from 'mobx'; -export interface NaviconProps{ +export interface NaviconProps { onClick(): void; } @@ -13,19 +13,21 @@ export class NaviconButton extends React.Component<NaviconProps> { @observable private _ref: React.RefObject<HTMLAnchorElement> = React.createRef(); componentDidMount = () => { - let that = this; - if(this._ref.current){this._ref.current.addEventListener("click", function(e) { - e.preventDefault(); - if(that._ref.current){ - that._ref.current.classList.toggle('active'); - return false; - } - });} + const that = this; + if (this._ref.current) { + this._ref.current.addEventListener("click", function (e) { + e.preventDefault(); + if (that._ref.current) { + that._ref.current.classList.toggle('active'); + return false; + } + }); + } } render() { return ( - <a id="hamburger-icon" href="#" ref = {this._ref} title="Menu"> + <a id="hamburger-icon" href="#" ref={this._ref} title="Menu"> <span className="line line-1"></span> <span className="line line-2"></span> <span className="line line-3"></span> |
