setting favicon based on whiteLabel

This commit is contained in:
Carter 2025-02-28 10:59:19 -06:00
parent 22a892fa7b
commit aa4106806e
10 changed files with 12 additions and 74 deletions

View file

@ -24,6 +24,12 @@ function App() {
}
})
// Set favicon
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
if (faviconDocument) {
faviconDocument.href = `${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
}
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;

View file

@ -17,6 +17,7 @@ const useStyles = makeStyles((theme: Theme) => ({
appBar: {
zIndex: theme.zIndex.drawer + 1,
backgroundImage: "none", // This prevents de-saturation of header in dark mode
// backgroundColor: "#272727"
},
toolbar: {
marginLeft: theme.spacing(0.5),

View file

@ -91,7 +91,8 @@ const BXT_WHITE_LABEL: WhiteLabel = {
name: "Brand X Technologies",
primaryColour: "blue",
secondaryColour: "yellow",
signatureColour: "#005bb0",
signatureColour: "#272727",
// signatureColour: "#005bb0",
signatureAccentColour: "#fff",
auth0ClientId: import.meta.env.REACT_APP_AUTH0_STAGING_CLIENT_ID,
redirectOnLogout: false,
@ -250,7 +251,7 @@ const whitelabels = new Map<string, WhiteLabel>([
["brandxducks", BXT_WHITE_LABEL],
["brandxtech", BXT_WHITE_LABEL],
["aerogrowmanufacturing", AEROGROW_WHITE_LABEL],
["localhost", ADAPTIVE_AGRICULTURE_WHITE_LABEL],
["localhost", BXT_WHITE_LABEL],
["staging", STAGING_WHITELABEL],
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
["mivent", MIVENT_WHITE_LABEL],