Update to use standard timeslot output from API

This commit is contained in:
Matthew Stratford 2020-03-29 17:32:39 +01:00
parent 5b4911ac50
commit dce0643432
3 changed files with 7 additions and 6 deletions

View file

@ -48,8 +48,8 @@ const App: React.FC = () => {
var timeslotid = null;
if ("timeslot_id" in q) {
timeslotid = q.timeslot_id;
} else if (currentTimeslot.timeslotid != null) {
timeslotid = currentTimeslot.timeslotid;
} else if (currentTimeslot.timeslot_id != null) {
timeslotid = currentTimeslot.timeslot_id;
}
if (timeslotid !== null) {
return (

View file

@ -212,8 +212,9 @@ export function updateShowplan(
export interface Timeslot {
timeslotid: number,
starttime: number,
timeslot_id: number,
time: number,
start_time: string,
title: string
}

View file

@ -236,7 +236,7 @@ function NavBar() {
aria-haspopup="true"
aria-expanded="false"
>
<span className="fa fa-clock-o"></span>&nbsp;{sessionState.currentTimeslot && timestampToDateTime(sessionState.currentTimeslot.starttime)}
<span className="fa fa-clock-o"></span>&nbsp;{sessionState.currentTimeslot && sessionState.currentTimeslot.start_time}
</a>
<div className="dropdown-menu" aria-labelledby="timeslotDropdown">
<a
@ -246,7 +246,7 @@ function NavBar() {
Switch Timeslot
</a>
<h6 className="dropdown-header">{sessionState.currentTimeslot?.title}</h6>
<h6 className="dropdown-header">ID: {sessionState.currentTimeslot?.timeslotid}</h6>
<h6 className="dropdown-header">ID: {sessionState.currentTimeslot?.timeslot_id}</h6>
</div>
</li>
<li className="nav-item dropdown">