Use helpers to check environment in frontend (#27633)

This commit is contained in:
Renaud Chaput authored and GitHub committed 2023-10-31 16:05:44 +00:00
1 parent 7ef56d6e50
commit 277e6968f5
8 files changed
+28 -9

No files matched your search

@@ -17,8 +17,9 @@ import UI from 'mastodon/features/ui';
import initialState, { title as siteTitle } from 'mastodon/initial_state';
import { IntlProvider } from 'mastodon/locales';
import { store } from 'mastodon/store';
import { isProduction } from 'mastodon/utils/environment';
const title = process.env.NODE_ENV === 'production' ? siteTitle : `${siteTitle} (Dev)`;
const title = isProduction() ? siteTitle : `${siteTitle} (Dev)`;
const hydrateAction = hydrateStore(initialState);