putting default values for manifest and icon in app.tsx

This commit is contained in:
Carter 2025-02-28 12:06:52 -06:00
parent 3a953ede85
commit 81e98da93e
2 changed files with 15 additions and 4 deletions

View file

@ -19,7 +19,7 @@
}
],
"start_url": "/",
"theme_color": "#005bb0",
"theme_color": "#272727",
"background_color": "#424242",
"display": "standalone",
"orientation": "any"

View file

@ -21,14 +21,25 @@ function App() {
fetch(manifestPath).then(response => {
if (response.ok && manifestDocument) {
manifestDocument.href = manifestPath;
} else {
manifestDocument.href = "BrandXTechnologies/manifest.json"
}
}).catch(() => {
manifestDocument.href = "BrandXTechnologies/manifest.json"
})
// Set favicon
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
if (faviconDocument) {
faviconDocument.href = `${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
}
const faviconPath = `${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
fetch(faviconPath).then(response => {
if (response.ok && faviconDocument) {
faviconDocument.href = faviconPath;
} else {
faviconDocument.href = "BrandXTechnologies/favicon.ico"
}
}).catch(() => {
faviconDocument.href = "BrandXTechnologies/favicon.ico"
})
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;