Update to match new API for show title.

This commit is contained in:
Matthew Stratford 2020-03-29 13:58:41 +01:00
parent 03146644c2
commit 5c054f7abd
2 changed files with 18 additions and 4 deletions

View file

@ -53,7 +53,7 @@ const sessionState = createSlice({
state.timeslotLoadError = null;
state.currentTimeslot = action.payload;
if (action.payload != null) {
state.currentTimeslot.timeStr = timestampToDateTime(action.payload.time);
state.currentTimeslot.starttimeStr = timestampToDateTime(action.payload.starttime);
}
},
getTimeslotError(state, action: PayloadAction<string>) {

View file

@ -226,13 +226,27 @@ function NavBar() {
{broadcastState.connectionState}
</button>
</li>
<li className="nav-item">
<li className="nav-item dropdown">
<a
className="nav-link"
className="nav-link dropdown-toggle"
href={MYRADIO_NON_API_BASE + "/MyRadio/timeslot/?next=" + redirect_url}
id="timeslotDropdown"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<span className="fa fa-clock-o"></span>&nbsp;{sessionState.currentTimeslot?.starttimeStr}
</a>
<div className="dropdown-menu" aria-labelledby="timeslotDropdown">
<a
className="dropdown-item"
href={MYRADIO_NON_API_BASE + "/MyRadio/timeslot/?next=" + redirect_url}
>
<span className="fa fa-clock-o"></span>&nbsp;{sessionState.currentTimeslot?.timeStr}
Switch Timeslot
</a>
<h6 className="dropdown-header">{sessionState.currentTimeslot?.title}</h6>
<h6 className="dropdown-header">ID: {sessionState.currentTimeslot?.timeslotid}</h6>
</div>
</li>
<li className="nav-item dropdown">
<a