Don't update check when not in production build
This commit is contained in:
@@ -156,6 +156,7 @@ export default function RootLayout ({
|
||||
|
||||
useEffect(() => {
|
||||
;(async () => {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
setLoadingText('Checking latest version...')
|
||||
try {
|
||||
const response = await axios.get(
|
||||
@@ -170,6 +171,7 @@ export default function RootLayout ({
|
||||
setLoadingText('Failed to check latest version.')
|
||||
return
|
||||
}
|
||||
}
|
||||
setLoadingText('Loading configs...')
|
||||
const normalConfig = await readNormalConfig()
|
||||
const versionsConfig = await readVersionsConfig()
|
||||
|
||||
Reference in New Issue
Block a user