Skip to content

Commit

Permalink
Added page to change track selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
n1kPLV committed Jul 20, 2023
1 parent 978f9f2 commit 29e4bb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Website/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default function Home() {
href={'/map'}>here</Link></li>
<li>Add a track <Link className="text-blue-600 visited:text-purple-700"
href={'/add_track'}>here</Link></li>
<li>Select a different track <Link className="text-blue-600 visited:text-purple-700"
href={'/select_track'}>here</Link></li>
<li>Login <Link className="text-blue-600 visited:text-purple-700"
href={'/login'}>here</Link></li>
<li>Logout <Link className="text-blue-600 visited:text-purple-700"
Expand Down
12 changes: 12 additions & 0 deletions Website/src/app/select_track/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Selection from "@/components/track_selection";

export default function Page() {
return (
// <div className='h-full min-h-screen'>
<main className="container mx-auto max-w-2xl grow">
<div className={'bg-white p-4 rounded'}>
<Selection/>
</div>
</main>
);
}
3 changes: 2 additions & 1 deletion Website/src/lib/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
AuthenticationRequest,
AuthenticationResponse,
InitResponse, TrackList,
TrackListEntry,
TrackPath,
Vehicle
} from "./api.website";
Expand Down Expand Up @@ -70,6 +69,8 @@ export async function sendTrack(token: string, trackPayload: TrackPath) {
return undefined;
}
} catch (e) {
if (e instanceof UnauthorizedError)
throw e;
console.error("An error uploading track", e);
return undefined;
}
Expand Down

0 comments on commit 29e4bb1

Please sign in to comment.