Use baked-in homepages until service is moved elsewhere

The code currently supports both the baked-in homepages, as well as fetching from `/$/api/content/v1/get`.

As the latter is currently a circular round-trip, just use the baked-in version until the service is moved elsewhere. Loading performance will be better.
This commit is contained in:
infinite-persistence 2022-04-13 22:53:58 +08:00 committed by Thomas Zarebczan
parent 17d5d5c73b
commit 99b446a8fe
2 changed files with 3 additions and 2 deletions

View file

@ -58,6 +58,7 @@ SHOW_ADS=true
ENABLE_MATURE=false
ENABLE_UI_NOTIFICATIONS=true
#SHOW_TAGS_INTRO=false
USE_LOCAL_HOMEPAGE_DATA=true
AUTO_FOLLOW_CHANNELS=lbry://@lbry#3fda836a92faaceedfe398225fb9b2ee2ed1f01a
@ -108,4 +109,3 @@ FIREBASE_VAPID_KEY=BFayEBpwMTU9GQQpXgitIJkfx-SD8-ltrFb3wLTZWgA27MfBhG4948pe0eERl
# --- Development ---
REPORT_NEW_STRINGS=false
USE_LOCAL_HOMEPAGE_DATA=false

View file

@ -310,11 +310,12 @@ export function doFetchLanguage(language) {
export function doFetchHomepages() {
return (dispatch) => {
// -- Use this env flag to use local homepage data. Otherwise, it will grab from odysee.com.
// -- Use this env flag to use local homepage data. Otherwise, it will grab from `/$/api/content/v1/get`.
// @if USE_LOCAL_HOMEPAGE_DATA='true'
const homepages = require('homepages');
if (homepages) {
window.homepages = homepages;
dispatch({ type: ACTIONS.FETCH_HOMEPAGES_DONE });
return;
}
// @endif