From 94b466e6d8f1a3b2c075d32c967eb544d3253b0f Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Wed, 17 Feb 2021 23:12:44 +0100 Subject: [PATCH] frontend: Some linting --- frontend/src/App.js | 3 +-- frontend/src/pages/TrackPage/index.tsx | 2 +- frontend/src/query.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index 6f2e71d..8ca263d 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -2,7 +2,6 @@ import React from 'react' import {connect} from 'react-redux' import {Icon, Button} from 'semantic-ui-react' import {BrowserRouter as Router, Switch, Route, Link} from 'react-router-dom' -import _ from 'lodash' import styles from './App.module.scss' import api from './api' @@ -42,7 +41,7 @@ const App = connect((state) => ({login: state.login}))(function App({login}) { Feed
  • - + About
  • diff --git a/frontend/src/pages/TrackPage/index.tsx b/frontend/src/pages/TrackPage/index.tsx index 9d7b763..efa281f 100644 --- a/frontend/src/pages/TrackPage/index.tsx +++ b/frontend/src/pages/TrackPage/index.tsx @@ -3,7 +3,7 @@ import {connect} from 'react-redux' import {Table, Checkbox, Segment, Dimmer, Grid, Loader, Header} from 'semantic-ui-react' import {useParams} from 'react-router-dom' import {concat, combineLatest, of, from, Subject} from 'rxjs' -import {pluck, distinctUntilChanged, map, switchMap, startWith, sample} from 'rxjs/operators' +import {pluck, distinctUntilChanged, map, switchMap, startWith} from 'rxjs/operators' import {useObservable} from 'rxjs-hooks' import Markdown from 'react-markdown' diff --git a/frontend/src/query.ts b/frontend/src/query.ts index 060bc52..0b4556a 100644 --- a/frontend/src/query.ts +++ b/frontend/src/query.ts @@ -52,7 +52,7 @@ export function useQueryParam( convert: (t: T | null) => T | null = (x) => x ): [T, (newValue: T) => void] { const history = useHistory() - const _triggerReload = useLocation() + useLocation() // to trigger a reload when the url changes const {[name]: value = defaultValue} = (parseQuery(history.location.search) as unknown) as { [name: string]: T }