Add WIP dummy timeslotid back

This commit is contained in:
Matthew Stratford 2021-05-31 22:48:40 +01:00
parent 6050c9effe
commit f63ec718c2
3 changed files with 10 additions and 9 deletions

View file

@ -25,11 +25,18 @@ const App: React.FC = () => {
const [inputVal, setInputVal] = useState("");
const force = useForceUpdate();
const {
currentUser,
userLoading,
currentTimeslot,
timeslotLoading,
} = useSelector((state: RootState) => state.session);
if (process.env.REACT_APP_BAPSICLE_INTERFACE) {
if (bapsConnectionState !== "CONNECTED") {
return <BAPSSessionHandler />;
} else {
return <Showplanner />;
return <Showplanner timeslotId={-1} />;
}
}
@ -46,13 +53,6 @@ const App: React.FC = () => {
const q = qs.parse(window.location.search, { ignoreQueryPrefix: true });
const {
currentUser,
userLoading,
currentTimeslot,
timeslotLoading,
} = useSelector((state: RootState) => state.session);
if (
currentUser == null ||
userLoading ||

View file

@ -53,7 +53,7 @@ const SessionHandler: React.FC = function() {
switch (connectionState) {
case "CONNECTED":
return <Showplanner />;
return <Showplanner timeslotId={-1} />;
case "CONNECTING":
return <ConnectionDialogue error={null} />;
case "FAILED":

View file

@ -274,6 +274,7 @@ export const setItemPlayed = (
};
export const moveItem = (
timeslotid: number,
itemid: string,
to: [number, number]
): AppThunk => async (dispatch, getState) => {