- progress

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-17 19:36:21 -05:00
parent 1a93e1de41
commit 4a9684ba87
15 changed files with 174 additions and 136 deletions

View File

@@ -21,7 +21,7 @@ import {selectBodyshop, selectCurrentUser,} from "../redux/user/user.selectors";
import PrivateRoute from "../components/PrivateRoute";
import "./App.styles.scss";
import handleBeta from "../utils/betaHandler";
import Eula, {eulaIsApplicable} from "../components/eula/eula.component";
import Eula from "../components/eula/eula.component";
const ResetPassword = lazy(() =>
import("../pages/reset-password/reset-password.component")
@@ -45,7 +45,6 @@ const mapDispatchToProps = (dispatch) => ({
export function App({bodyshop, checkUserSession, currentUser, online, setOnline}) {
const client = useSplitClient().client;
const [isAccepted, setIsAccepted] = useState(false);
const [listenersAdded, setListenersAdded] = useState(false)
const {t} = useTranslation();
@@ -125,8 +124,8 @@ export function App({bodyshop, checkUserSession, currentUser, online, setOnline}
/>
);
if (eulaIsApplicable({currentUser, isAccepted})) {
return <Eula setIsAccepted={setIsAccepted}/>
if (!currentUser.isEulaAccepted) {
return <Eula/>
}
// Any route that is not assigned and matched will default to the Landing Page component