chore: Format code
This commit is contained in:
parent
989b294791
commit
618230601e
|
@ -28,16 +28,26 @@ import api from 'api'
|
||||||
// which is a workaround for an annoying warning that is somehow caused by the
|
// which is a workaround for an annoying warning that is somehow caused by the
|
||||||
// <Link /> and <Menu.Item /> combination.
|
// <Link /> and <Menu.Item /> combination.
|
||||||
function MenuItemForLink({navigate, ...props}) {
|
function MenuItemForLink({navigate, ...props}) {
|
||||||
return <Menu.Item {...props} onClick={(e) => {
|
return (
|
||||||
e.preventDefault()
|
<Menu.Item
|
||||||
navigate()
|
{...props}
|
||||||
}} />
|
onClick={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
navigate()
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
function DropdownItemForLink({navigate, ...props}) {
|
function DropdownItemForLink({navigate, ...props}) {
|
||||||
return <Dropdown.Item {...props}onClick={(e) => {
|
return (
|
||||||
e.preventDefault()
|
<Dropdown.Item
|
||||||
navigate()
|
{...props}
|
||||||
}} />
|
onClick={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
navigate()
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const App = connect((state) => ({login: state.login}))(function App({login}) {
|
const App = connect((state) => ({login: state.login}))(function App({login}) {
|
||||||
|
@ -56,9 +66,11 @@ const App = connect((state) => ({login: state.login}))(function App({login}) {
|
||||||
OpenBikeSensor
|
OpenBikeSensor
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{config?.obsMapSource && <Link component={MenuItemForLink} to="/map" as="a">
|
{config?.obsMapSource && (
|
||||||
Map
|
<Link component={MenuItemForLink} to="/map" as="a">
|
||||||
</Link>}
|
Map
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
|
||||||
<Link component={MenuItemForLink} to="/tracks" as="a">
|
<Link component={MenuItemForLink} to="/tracks" as="a">
|
||||||
Tracks
|
Tracks
|
||||||
|
@ -179,7 +191,13 @@ const App = connect((state) => ({login: state.login}))(function App({login}) {
|
||||||
<Header as="h5">Info</Header>
|
<Header as="h5">Info</Header>
|
||||||
<List>
|
<List>
|
||||||
<List.Item>
|
<List.Item>
|
||||||
<a href={`https://github.com/openbikesensor/portal${apiVersion ? `/releases/tag/v${apiVersion}` : ''}`} target="_blank" rel="noreferrer">
|
<a
|
||||||
|
href={`https://github.com/openbikesensor/portal${
|
||||||
|
apiVersion ? `/releases/tag/v${apiVersion}` : ''
|
||||||
|
}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
{apiVersion ? `v${apiVersion}` : 'Fetching version...'}
|
{apiVersion ? `v${apiVersion}` : 'Fetching version...'}
|
||||||
</a>
|
</a>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
|
|
Loading…
Reference in a new issue