Update to match new API for show title.
This commit is contained in:
parent
03146644c2
commit
5c054f7abd
2 changed files with 18 additions and 4 deletions
|
@ -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>) {
|
||||
|
|
|
@ -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> {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> {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
|
||||
|
|
Loading…
Reference in a new issue