Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/constants/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ module.exports = {

TC_NOTIFICATION_URL: 'https://api.topcoder-dev.com/v5/notifications',
CONNECT_MESSAGE_API_URL: 'https://api.topcoder-dev.com/v5',
TC_SYSTEM_USERID: process.env.DEV_TC_SYSTEM_USERID
TC_SYSTEM_USERID: process.env.DEV_TC_SYSTEM_USERID,
MAINTENANCE_MODE: process.env.DEV_MAINTENANCE_MODE
}
3 changes: 2 additions & 1 deletion config/constants/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ module.exports = {

TC_NOTIFICATION_URL: 'https://api.topcoder.com/v5/notifications',
CONNECT_MESSAGE_API_URL: 'https://api.topcoder.com/v5',
TC_SYSTEM_USERID: process.env.PROD_TC_SYSTEM_USERID
TC_SYSTEM_USERID: process.env.PROD_TC_SYSTEM_USERID,
MAINTENANCE_MODE: process.env.PROD_MAINTENANCE_MODE
}
3 changes: 2 additions & 1 deletion config/constants/qa.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ module.exports = {

TC_NOTIFICATION_URL: 'https://api.topcoder-dev.com/v5/notifications',
CONNECT_MESSAGE_API_URL: 'https://api.topcoder-qa.com/v5',
TC_SYSTEM_USERID: process.env.QA_TC_SYSTEM_USERID
TC_SYSTEM_USERID: process.env.QA_TC_SYSTEM_USERID,
MAINTENANCE_MODE: process.env.QA_MAINTENANCE_MODE,
}
4 changes: 2 additions & 2 deletions src/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import Footer from '../Footer/Footer'
// import { MAINTENANCE_MODE } from '../../config/constants'
import { MAINTENANCE_MODE } from '../../config/constants'
import Alert from 'react-s-alert'
import cn from 'classnames'
import Maintenance from '../Maintenance/Maintenance'
Expand All @@ -16,7 +16,7 @@ const Layout = (props) => {

if (isLoadingUser) {
return (<div />)
} else if (maintenanceMode) {
} else if (MAINTENANCE_MODE || maintenanceMode) {
return <Maintenance />
} else {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export const PROJECT_MAX_COLORS = 5
export const AUTOCOMPLETE_TRIGGER_LENGTH = 3

// Toggle this flag to enable/disable maintenance mode
export const MAINTENANCE_MODE = false
export const MAINTENANCE_MODE = process.env.MAINTENANCE_MODE

export const LS_INCOMPLETE_PROJECT = 'incompleteProject'

Expand Down