mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: don't treat dev environment as a special case
This commit is contained in:
committed by
Abdullah Atta
parent
f69afd2d9a
commit
2d277fbe2b
@@ -18,15 +18,14 @@ module.exports = {
|
||||
},
|
||||
all: {
|
||||
UV_THREADPOOL_SIZE: IS_CI ? NUM_CPUS : 2,
|
||||
GENERATE_SOURCEMAP: false,
|
||||
GENERATE_SOURCEMAP: process.env.NODE_ENV !== "production",
|
||||
INLINE_RUNTIME_CHUNK: false,
|
||||
DISABLE_ESLINT_PLUGIN: true,
|
||||
REACT_APP_GIT_HASH: gitHash,
|
||||
REACT_APP_VERSION: APP_VERSION
|
||||
},
|
||||
dev: {
|
||||
REACT_APP_LOCALHOST: ip.address(),
|
||||
REACT_APP_CI: "true"
|
||||
REACT_APP_LOCALHOST: ip.address()
|
||||
},
|
||||
web: {
|
||||
REACT_APP_PLATFORM: "web"
|
||||
|
||||
@@ -122,8 +122,6 @@ const onboarding = {
|
||||
};
|
||||
|
||||
export function interruptedOnboarding() {
|
||||
if (process.env.NODE_ENV === "development" || isTesting()) return;
|
||||
|
||||
for (let key in onboarding) {
|
||||
const index = Config.get(key, undefined);
|
||||
if (index >= 0 && index < onboarding[key].length - 1) return key;
|
||||
|
||||
@@ -37,8 +37,7 @@ export default function useDatabase(persistence) {
|
||||
|
||||
(async () => {
|
||||
await import("../app.css");
|
||||
if (process.env.NODE_ENV !== "development")
|
||||
await initializeDatabase(persistence);
|
||||
await initializeDatabase(persistence);
|
||||
setIsAppLoaded(true);
|
||||
memory.isAppLoaded = true;
|
||||
})();
|
||||
|
||||
@@ -29,7 +29,6 @@ export function useIsUserPremium() {
|
||||
}
|
||||
|
||||
export function isUserPremium(user) {
|
||||
if (process.env.REACT_APP_CI) return true;
|
||||
if (!user) user = userstore.get().user;
|
||||
|
||||
const subStatus = user?.subscription?.type;
|
||||
|
||||
@@ -142,15 +142,7 @@ function isSessionExpired(path: Routes): RouteWithPath<AuthProps> | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
(async function dev() {
|
||||
const { initializeDatabase } = await import("./common/db");
|
||||
await initializeDatabase();
|
||||
renderApp();
|
||||
})();
|
||||
} else {
|
||||
renderApp();
|
||||
}
|
||||
renderApp();
|
||||
|
||||
async function renderApp() {
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user