Use env for loading-bar color instead of hardcoded.

This commit is contained in:
infinite-persistence 2021-06-29 20:54:54 +08:00 committed by infinite-persistence
parent c5a63de33c
commit 099667a4bb
3 changed files with 4 additions and 4 deletions

View file

@ -35,6 +35,7 @@ ENABLE_PREROLL_ADS=false
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
CHANNEL_STAKED_LEVEL_LIVESTREAM=5
WEB_PUBLISH_SIZE_LIMIT_GB=4
LOADING_BAR_COLOR=#2bbb90
# OG
OG_TITLE_SUFFIX=| lbry.tv

View file

@ -41,6 +41,7 @@ const config = {
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
CHANNEL_STAKED_LEVEL_LIVESTREAM: process.env.CHANNEL_STAKED_LEVEL_LIVESTREAM,
WEB_PUBLISH_SIZE_LIMIT_GB: process.env.WEB_PUBLISH_SIZE_LIMIT_GB,
LOADING_BAR_COLOR: process.env.LOADING_BAR_COLOR,
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
SHOW_ADS: process.env.SHOW_ADS === 'true',
PINNED_URI_1: process.env.PINNED_URI_1,

View file

@ -1,10 +1,8 @@
// @flow
import * as React from 'react';
import { LOADING_BAR_COLOR } from 'config';
import LoadingBar from 'react-top-loading-bar';
// TODO: Retrieve from CSS?
export const COLOR_LOADING_BAR = '#2bbb90';
function LoadingBarOneOff(props: any) {
const loadingBarRef = React.useRef(null);
@ -14,7 +12,7 @@ function LoadingBarOneOff(props: any) {
}
}, []);
return <LoadingBar color={COLOR_LOADING_BAR} ref={loadingBarRef} />;
return <LoadingBar color={LOADING_BAR_COLOR} ref={loadingBarRef} />;
}
export default LoadingBarOneOff;