import React, { useReducer, useState } from "react";
import { useSelector } from "react-redux";
import qs from "qs";
import "./App.css";
import Showplanner from "./showplanner";
import BAPSSessionHandler from "./bapsiclesession";
import SessionHandler from "./session";
import { RootState } from "./rootReducer";
import "./light-theme.scss";
import "./App.scss";
const forceReducer = (state: boolean) => !state;
function useForceUpdate() {
const [, action] = useReducer(forceReducer, false);
return () => action(null);
}
const App: React.FC = () => {
const bapsConnectionState = useSelector(
(state: RootState) => state.bapsSession.connectionState
);
const [inputVal, setInputVal] = useState("");
const force = useForceUpdate();
const {
currentUser,
userLoading,
currentTimeslot,
timeslotLoading,
} = useSelector((state: RootState) => state.session);
if (process.env.REACT_APP_BAPSICLE_INTERFACE) {
document.title = "BAPS3 Presenter";
if (bapsConnectionState !== "CONNECTED") {
return