Don't update check when not in production build

This commit is contained in:
2025-08-29 11:15:35 -07:00
parent 2f394593d9
commit 35b0a9a6ca

View File

@@ -156,19 +156,21 @@ export default function RootLayout ({
useEffect(() => { useEffect(() => {
;(async () => { ;(async () => {
setLoadingText('Checking latest version...') if (process.env.NODE_ENV === 'production') {
try { setLoadingText('Checking latest version...')
const response = await axios.get( try {
'https://berrydash.lncvrt.xyz/database/launcher/latest.php' const response = await axios.get(
) 'https://berrydash.lncvrt.xyz/database/launcher/latest.php'
const client = await app.getVersion() )
if (response.data !== client) { const client = await app.getVersion()
setOutdated(true) if (response.data !== client) {
setOutdated(true)
return
}
} catch {
setLoadingText('Failed to check latest version.')
return return
} }
} catch {
setLoadingText('Failed to check latest version.')
return
} }
setLoadingText('Loading configs...') setLoadingText('Loading configs...')
const normalConfig = await readNormalConfig() const normalConfig = await readNormalConfig()