Merge branch 'staging_environment' into dev_environment
This commit is contained in:
commit
e56c5f0781
17 changed files with 2346 additions and 34 deletions
|
|
@ -5,13 +5,11 @@ import HTTPProvider from 'providers/http'
|
|||
import { useState } from 'react'
|
||||
import LoadingScreen from './LoadingScreen'
|
||||
import UserWrapper from './UserWrapper'
|
||||
import { CssBaseline } from '@mui/material'
|
||||
import { getWhitelabel } from 'services/whiteLabel'
|
||||
import { AppThemeProvider } from 'theme/AppThemeProvider'
|
||||
|
||||
function App() {
|
||||
const [token, setToken] = useState<string | undefined>(undefined)
|
||||
// const [palette, setPalette] = useState<Theme>(CreateTheme(getThemeType()));
|
||||
|
||||
const whiteLabel = getWhitelabel()
|
||||
const manifestPath = "/" + whiteLabel.name.replace(/\s/g, "") + "/manifest.json"
|
||||
|
|
@ -42,12 +40,9 @@ function App() {
|
|||
let domain: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
|
||||
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
|
||||
|
||||
let client_id = import.meta.env.VITE_AUTH0_DEV_CLIENT_ID;
|
||||
|
||||
console.log("Domain: " + domain)
|
||||
console.log("Audience: " + audience)
|
||||
console.log("Client ID: " + client_id)
|
||||
console.log("API URL: " + import.meta.env.VITE_APP_API_URL)
|
||||
// let client_id = whiteLabel.auth0ClientId
|
||||
let client_id = import.meta.env.VITE_AUTH0_CLIENT_ID;
|
||||
// if (!client_id) client_id = import.meta.env.VITE_AUTH0_CLIENT_ID;
|
||||
|
||||
return (
|
||||
<AppThemeProvider>
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ interface WhiteLabel {
|
|||
// };
|
||||
|
||||
const STAGING_WHITELABEL: WhiteLabel = {
|
||||
name: import.meta.env.REACT_APP_WEBSITE_TITLE,
|
||||
primaryColour: import.meta.env.REACT_APP_PRIMARY_COLOUR,
|
||||
secondaryColour: import.meta.env.REACT_APP_SECONDARY_COLOUR,
|
||||
signatureColour: import.meta.env.REACT_APP_SIGNATURE_COLOUR,
|
||||
name: import.meta.env.VITE_APP_WEBSITE_TITLE,
|
||||
primaryColour: import.meta.env.VITE_APP_PRIMARY_COLOUR,
|
||||
secondaryColour: import.meta.env.VITE_APP_SECONDARY_COLOUR,
|
||||
signatureColour: import.meta.env.VITE_APP_SIGNATURE_COLOUR,
|
||||
signatureAccentColour: "#fff",
|
||||
auth0ClientId: import.meta.env.REACT_APP_AUTH0_STAGING_CLIENT_ID,
|
||||
auth0ClientId: import.meta.env.VITE_AUTH0_STAGING_CLIENT_ID,
|
||||
redirectOnLogout: false,
|
||||
logoutRedirectTarget: "",
|
||||
darkLogo: DefaultDarkLogo,
|
||||
|
|
@ -259,7 +259,7 @@ const whitelabels = new Map<string, WhiteLabel>([
|
|||
["brandxducks", BXT_WHITE_LABEL],
|
||||
["brandxtech", BXT_WHITE_LABEL],
|
||||
["aerogrowmanufacturing", AEROGROW_WHITE_LABEL],
|
||||
["localhost", BXT_WHITE_LABEL],
|
||||
["localhost", STAGING_WHITELABEL],
|
||||
["staging", STAGING_WHITELABEL],
|
||||
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
|
||||
["mivent", MIVENT_WHITE_LABEL],
|
||||
|
|
@ -276,6 +276,9 @@ export function getWhitelabel(): WhiteLabel {
|
|||
if (window.location.origin.includes("bxt-dev")) {
|
||||
return BXT_WHITE_LABEL;
|
||||
}
|
||||
if (window.location.origin.includes("staging")) {
|
||||
return STAGING_WHITELABEL;
|
||||
}
|
||||
const whiteLabelKeys = Array.from(whitelabels.keys());
|
||||
for (var i = 0; i < whiteLabelKeys.length; i++) {
|
||||
let key = whiteLabelKeys[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue