@@ -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
|
||||
|
||||
Reference in New Issue
Block a user