putting default values for manifest and icon in app.tsx
This commit is contained in:
parent
3a953ede85
commit
81e98da93e
2 changed files with 15 additions and 4 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url": "/",
|
"start_url": "/",
|
||||||
"theme_color": "#005bb0",
|
"theme_color": "#272727",
|
||||||
"background_color": "#424242",
|
"background_color": "#424242",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"orientation": "any"
|
"orientation": "any"
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,25 @@ function App() {
|
||||||
fetch(manifestPath).then(response => {
|
fetch(manifestPath).then(response => {
|
||||||
if (response.ok && manifestDocument) {
|
if (response.ok && manifestDocument) {
|
||||||
manifestDocument.href = manifestPath;
|
manifestDocument.href = manifestPath;
|
||||||
|
} else {
|
||||||
|
manifestDocument.href = "BrandXTechnologies/manifest.json"
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
manifestDocument.href = "BrandXTechnologies/manifest.json"
|
||||||
})
|
})
|
||||||
|
|
||||||
// Set favicon
|
// Set favicon
|
||||||
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
|
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
|
||||||
if (faviconDocument) {
|
const faviconPath = `${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
|
||||||
faviconDocument.href = `${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 url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
|
||||||
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
|
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue