Add WIP dummy timeslotid back
This commit is contained in:
parent
6050c9effe
commit
f63ec718c2
3 changed files with 10 additions and 9 deletions
16
src/App.tsx
16
src/App.tsx
|
@ -25,11 +25,18 @@ const App: React.FC = () => {
|
||||||
const [inputVal, setInputVal] = useState("");
|
const [inputVal, setInputVal] = useState("");
|
||||||
const force = useForceUpdate();
|
const force = useForceUpdate();
|
||||||
|
|
||||||
|
const {
|
||||||
|
currentUser,
|
||||||
|
userLoading,
|
||||||
|
currentTimeslot,
|
||||||
|
timeslotLoading,
|
||||||
|
} = useSelector((state: RootState) => state.session);
|
||||||
|
|
||||||
if (process.env.REACT_APP_BAPSICLE_INTERFACE) {
|
if (process.env.REACT_APP_BAPSICLE_INTERFACE) {
|
||||||
if (bapsConnectionState !== "CONNECTED") {
|
if (bapsConnectionState !== "CONNECTED") {
|
||||||
return <BAPSSessionHandler />;
|
return <BAPSSessionHandler />;
|
||||||
} else {
|
} 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 q = qs.parse(window.location.search, { ignoreQueryPrefix: true });
|
||||||
|
|
||||||
const {
|
|
||||||
currentUser,
|
|
||||||
userLoading,
|
|
||||||
currentTimeslot,
|
|
||||||
timeslotLoading,
|
|
||||||
} = useSelector((state: RootState) => state.session);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
currentUser == null ||
|
currentUser == null ||
|
||||||
userLoading ||
|
userLoading ||
|
||||||
|
|
|
@ -53,7 +53,7 @@ const SessionHandler: React.FC = function() {
|
||||||
|
|
||||||
switch (connectionState) {
|
switch (connectionState) {
|
||||||
case "CONNECTED":
|
case "CONNECTED":
|
||||||
return <Showplanner />;
|
return <Showplanner timeslotId={-1} />;
|
||||||
case "CONNECTING":
|
case "CONNECTING":
|
||||||
return <ConnectionDialogue error={null} />;
|
return <ConnectionDialogue error={null} />;
|
||||||
case "FAILED":
|
case "FAILED":
|
||||||
|
|
|
@ -274,6 +274,7 @@ export const setItemPlayed = (
|
||||||
};
|
};
|
||||||
|
|
||||||
export const moveItem = (
|
export const moveItem = (
|
||||||
|
timeslotid: number,
|
||||||
itemid: string,
|
itemid: string,
|
||||||
to: [number, number]
|
to: [number, number]
|
||||||
): AppThunk => async (dispatch, getState) => {
|
): AppThunk => async (dispatch, getState) => {
|
||||||
|
|
Loading…
Reference in a new issue