diff --git a/.env b/.env index 34dbdf6..36113cd 100644 --- a/.env +++ b/.env @@ -15,3 +15,4 @@ SEGMENT_KEY=null SITE_NAME=null SUPPORT_URL=null USER_INFO_COOKIE_NAME=null +ENABLE_LOGIN_AND_REGISTRATION=null \ No newline at end of file diff --git a/.env.development b/.env.development index 5bbfc73..8dc1b87 100644 --- a/.env.development +++ b/.env.development @@ -16,3 +16,4 @@ SEGMENT_KEY=null SITE_NAME='edX' SUPPORT_URL='http://localhost:18000/support' USER_INFO_COOKIE_NAME='edx-user-info' +ENABLE_LOGIN_AND_REGISTRATION=true diff --git a/src/index.jsx b/src/index.jsx index 19959eb..658fd11 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,6 +1,6 @@ import 'babel-polyfill'; import 'formdata-polyfill'; -import { AppProvider, ErrorPage } from '@edx/frontend-platform/react'; +import { AppProvider, ErrorPage, AuthenticatedPageRoute } from '@edx/frontend-platform/react'; import { subscribe, initialize, APP_INIT_ERROR, APP_READY, mergeConfig } from '@edx/frontend-platform'; import React from 'react'; import ReactDOM from 'react-dom'; @@ -24,10 +24,14 @@ subscribe(APP_READY, () => {
- - + - + { + getConfig().ENABLE_LOGIN_AND_REGISTRATION && <> + + + + }
@@ -53,6 +57,7 @@ initialize({ config: () => { mergeConfig({ SUPPORT_URL: process.env.SUPPORT_URL, + ENABLE_LOGIN_AND_REGISTRATION: process.env.ENABLE_LOGIN_AND_REGISTRATION, }, 'App loadConfig override handler'); }, },