- >
- )
-}
-
-function MostRecentTrack() {
- const track: Track | null = useObservable(
- () =>
- of(null).pipe(
- switchMap(() => from(api.fetch('/tracks?limit=1'))),
- map((response) => response?.tracks?.[0])
- ),
- null,
- []
- )
-
- return (
- <>
- Most recent track
-
- {track === undefined ? (
-
- No public tracks yet. Upload the first!
-
- ) : track ? (
-
-
-
- ) : null}
- >
- )
-}
-
-export default function HomePage() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx
new file mode 100644
index 0000000..8c53fad
--- /dev/null
+++ b/frontend/src/pages/HomePage.tsx
@@ -0,0 +1,76 @@
+import React from 'react'
+import {Link} from 'react-router-dom'
+import {Message, Grid, Loader, Header, Item} from 'semantic-ui-react'
+import {useObservable} from 'rxjs-hooks'
+import {of, from} from 'rxjs'
+import {map, switchMap} from 'rxjs/operators'
+import {fromLonLat} from 'ol/proj'
+
+import api from 'api'
+import {Stats, Map, Page, RoadsLayer} from 'components'
+
+import {TrackListItem} from './TracksPage'
+import styles from './HomePage.module.scss'
+
+function WelcomeMap() {
+ return (
+
+ )
+}
+
+
+function MostRecentTrack() {
+ const track: Track | null = useObservable(
+ () =>
+ of(null).pipe(
+ switchMap(() => from(api.fetch('/tracks?limit=1'))),
+ map((response) => response?.tracks?.[0])
+ ),
+ null,
+ []
+ )
+
+ return (
+ <>
+ Most recent track
+
+ {track === undefined ? (
+
+ No public tracks yet. Upload the first!
+
+ ) : track ? (
+
+
+
+ ) : null}
+ >
+ )
+}
+
+export default function HomePage() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/frontend/src/pages/SettingsPage.tsx b/frontend/src/pages/SettingsPage.tsx
index c9b95ae..f87571e 100644
--- a/frontend/src/pages/SettingsPage.tsx
+++ b/frontend/src/pages/SettingsPage.tsx
@@ -1,14 +1,13 @@
import React from 'react'
import {connect} from 'react-redux'
-import {Message, Icon, Grid, Form, Button, TextArea, Ref, Input, Header} from 'semantic-ui-react'
+import {Message, Icon, Grid, Form, Button, TextArea, Ref, Input, Header, Divider} from 'semantic-ui-react'
import {useForm} from 'react-hook-form'
import {setLogin} from 'reducers/login'
-import {Page} from 'components'
+import {Page, Stats} from 'components'
import api from 'api'
import {findInput} from 'utils'
-
const SettingsPage = connect((state) => ({login: state.login}), {setLogin})(function SettingsPage({login, setLogin}) {
const {register, handleSubmit} = useForm()
const [loading, setLoading] = React.useState(false)
@@ -32,41 +31,44 @@ const SettingsPage = connect((state) => ({login: state.login}), {setLogin})(func
return (
-
-
-
+
+
+
+ Your profile
- Your profile
+ All of this information is public.
- All of this information is public.
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
)
})
@@ -87,9 +89,8 @@ function ApiKeyDialog({login}) {
<>
Your API Key
- Here you find your API Key, for use in the OpenBikeSensor. You can
- to copy and paste it into your sensor's configuration interface to
- allow direct upload from the device.
+ Here you find your API Key, for use in the OpenBikeSensor. You can to copy and paste it into your sensor's
+ configuration interface to allow direct upload from the device.
Please protect your API Key carefully as it allows full control over your account.