diff --git a/src/App.jsx b/src/App.jsx index 9497134..9abc031 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -75,10 +75,13 @@ function App() { ? `${data.username} Sub Info` : `${import.meta.env.VITE_BRAND_NAME || "Ourenus"} Sub Info`; - const isOffSections = useMemo(() => { - try { - return JSON.parse( - import.meta.env.VITE_OFF_SECTIONS || { + const isOffSections = useMemo(() => { + try { + const envValue = import.meta.env.VITE_OFF_SECTIONS; + if (envValue) { + return JSON.parse(envValue); + } + return { appsBox: true, logoBox: true, timeBox: true, @@ -86,13 +89,20 @@ function App() { userBox: true, supportBox: true, configs: true, - } - ); - } catch (error) { - console.error("Failed to parse VITE_OFF_SECTIONS:", error); - return {}; - } - }, []); + }; + } catch (error) { + console.error("Failed to parse VITE_OFF_SECTIONS:", error); + return { + appsBox: true, + logoBox: true, + timeBox: true, + usageBox: true, + userBox: true, + supportBox: true, + configs: true, + }; + } + }, []); return (