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