diff options
| author | bobzel <zzzman@gmail.com> | 2023-12-14 00:07:52 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-12-14 00:07:52 -0500 |
| commit | cebe9d2a567c20b99c8c394cfa598ee9d4d53ece (patch) | |
| tree | c33df9a3dc80cb199002610cc38645976023eff9 /src/client/views/search/NaviconButton.tsx | |
| parent | 1cf241544f8063e3d71406238a584299b6ced794 (diff) | |
a bunch more fixes to making things observable. fixed calling super.componentDidUpdate on subsclasses
Diffstat (limited to 'src/client/views/search/NaviconButton.tsx')
| -rw-r--r-- | src/client/views/search/NaviconButton.tsx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/client/views/search/NaviconButton.tsx b/src/client/views/search/NaviconButton.tsx deleted file mode 100644 index 0fa4a0fca..000000000 --- a/src/client/views/search/NaviconButton.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import * as React from 'react'; -import { observer } from 'mobx-react'; -import "./NaviconButton.scss"; -import * as $ from 'jquery'; -import { observable } from 'mobx'; - -export interface NaviconProps { - onClick(): void; -} - -export class NaviconButton extends React.Component<NaviconProps> { - - @observable private _ref: React.RefObject<HTMLAnchorElement> = React.createRef(); - - componentDidMount = () => { - 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"> - <span className="line line-1"></span> - <span className="line line-2"></span> - <span className="line line-3"></span> - </a> - ); - } -}
\ No newline at end of file |
