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(() => {
;(async () => {
setLoadingText('Checking latest version...')
try {
const response = await axios.get(
'https://berrydash.lncvrt.xyz/database/launcher/latest.php'
)
const client = await app.getVersion()
if (response.data !== client) {
setOutdated(true)
if (process.env.NODE_ENV === 'production') {
setLoadingText('Checking latest version...')
try {
const response = await axios.get(
'https://berrydash.lncvrt.xyz/database/launcher/latest.php'
)
const client = await app.getVersion()
if (response.data !== client) {
setOutdated(true)
return
}
} catch {
setLoadingText('Failed to check latest version.')
return
}
} catch {
setLoadingText('Failed to check latest version.')
return
}
setLoadingText('Loading configs...')
const normalConfig = await readNormalConfig()