wip: fix env stuff

This commit is contained in:
Rick Reilly
2020-02-13 13:06:51 -05:00
parent 147f305cd2
commit 06f320c1be
4 changed files with 6 additions and 4 deletions

2
.env
View File

@@ -15,4 +15,4 @@ SEGMENT_KEY=null
SITE_NAME=null
SUPPORT_URL=null
USER_INFO_COOKIE_NAME=null
ENABLE_LOGIN_AND_REGISTRATION=null
ENABLE_LOGIN_AND_REGISTRATION=false

View File

@@ -5,7 +5,7 @@ CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
ECOMMERCE_BASE_URL='http://localhost:18130'
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
LMS_BASE_URL='http://localhost:18000'
LOGIN_URL='http://localhost:18000/login'
LOGIN_URL='http://localhost:1997/login'
LOGOUT_URL='http://localhost:18000/login'
MARKETING_SITE_BASE_URL='http://localhost:18000'
NODE_ENV='development'

View File

@@ -15,3 +15,4 @@ SEGMENT_KEY=null
SITE_NAME='edX'
SUPPORT_URL='http://localhost:18000/support'
USER_INFO_COOKIE_NAME='edx-user-info'
ENABLE_LOGIN_AND_REGISTRATION=false #hackathon 23 todo

View File

@@ -1,7 +1,7 @@
import 'babel-polyfill';
import 'formdata-polyfill';
import { AppProvider, ErrorPage, AuthenticatedPageRoute } from '@edx/frontend-platform/react';
import { subscribe, initialize, APP_INIT_ERROR, APP_READY, mergeConfig } from '@edx/frontend-platform';
import { subscribe, initialize, APP_INIT_ERROR, APP_READY, mergeConfig, getConfig } from '@edx/frontend-platform';
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Switch } from 'react-router-dom';
@@ -27,7 +27,8 @@ subscribe(APP_READY, () => {
<AuthenticatedPageRoute exact path="/" component={AccountSettingsPage} />
<Route path="/notfound" component={NotFoundPage} />
{
getConfig().ENABLE_LOGIN_AND_REGISTRATION && <>
getConfig().ENABLE_LOGIN_AND_REGISTRATION &&
<>
<Route path="/login" component={LoginPage} />
<Route path="/registration" component={RegistrationPage} />
</>