Skip to content

Commit ad079e7

Browse files
committed
Shift USE_EMPTY_ASSET_PREFIX reading to commons/utils/Constants instead
1 parent ac875ef commit ad079e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/commons/utils/Constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const storiesBackendUrl = process.env.REACT_APP_STORIES_BACKEND_URL;
2121
const cadetLoggerUrl = isTest ? undefined : process.env.REACT_APP_CADET_LOGGER;
2222
const cadetLoggerInterval = parseInt(process.env.REACT_APP_CADET_LOGGER_INTERVAL || '10000', 10);
2323
const useBackend = !isTest && isTrue(process.env.REACT_APP_USE_BACKEND);
24+
const useEmptyAssetPrefix = isTrue(process.env.REACT_APP_USE_EMPTY_ASSET_PREFIX);
2425
const defaultSourceChapter = Chapter.SOURCE_4;
2526
const defaultSourceVariant = Variant.DEFAULT;
2627
const defaultQuestionId = 0;
@@ -154,6 +155,7 @@ const Constants = {
154155
storiesBackendUrl,
155156
cadetLoggerUrl,
156157
useBackend,
158+
useEmptyAssetPrefix,
157159
defaultSourceChapter,
158160
defaultSourceVariant,
159161
defaultQuestionId,

src/features/game/commons/CommonConstants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Links } from 'src/commons/utils/Constants';
1+
import UtilConstants, { Links } from 'src/commons/utils/Constants';
22

33
import FontAssets from '../assets/FontAssets';
44

55
export const Constants = {
66
assetsFolder: Links.sourceAcademyAssets,
7-
useEmptyAssetPrefix: process.env.REACT_APP_USE_EMPTY_ASSET_PREFIX?.toUpperCase() === 'TRUE',
7+
useEmptyAssetPrefix: UtilConstants.useEmptyAssetPrefix,
88
fadeDuration: 600,
99
nullFunction: () => {},
1010
nullInteractionId: '',

0 commit comments

Comments
 (0)