frontend: Some linting

This commit is contained in:
Paul Bienkowski 2021-02-17 23:12:44 +01:00
parent f56b303073
commit 94b466e6d8
3 changed files with 3 additions and 4 deletions

View file

@ -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>

View file

@ -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'

View file

@ -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
}