frontend: Some linting
This commit is contained in:
parent
f56b303073
commit
94b466e6d8
|
@ -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}) {
|
|||
<Link to="/feed">Feed</Link>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://openbikesensor.org/" target="_blank">
|
||||
<a href="https://openbikesensor.org/" target="_blank" rel="noreferrer">
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export function useQueryParam<T extends QueryValue>(
|
|||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue