implemented vite caching and added adaptive agriculture logos and manifest

This commit is contained in:
Carter 2025-02-27 12:06:41 -06:00
parent 9633fb7bb6
commit 1979976ad5
19 changed files with 4924 additions and 706 deletions

View file

@ -8,11 +8,23 @@ import UserWrapper from './UserWrapper'
import { CssBaseline, Theme, ThemeProvider } from '@mui/material'
import { CreateTheme } from '../theme/theme'
import { getThemeType, setThemeType } from '../theme/themeType'
import { getWhitelabel } from 'services/whiteLabel'
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"
// const defaultPath = "/AdaptiveAgriculture/manifest.json";
const manifestDocument = document.getElementById('manifest-link') as HTMLLinkElement
fetch(manifestPath).then(response => {
if (response.ok && manifestDocument) {
manifestDocument.href = manifestPath;
}
})
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;