Skip to content

Commit d8ade7d

Browse files
committed
load extensions locally
1 parent 2f57bfe commit d8ade7d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/containers/extension-library.jsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import VM from 'scratch-vm';
55
import {defineMessages, injectIntl, intlShape} from 'react-intl';
66
import log from '../lib/log';
7-
const {APP_DOMAIN} = require('../lib/brand');
7+
const {API_HOST} = require('../lib/brand');
88

99
import extensionLibraryContent, {
1010
galleryError,
@@ -43,7 +43,7 @@ const translateGalleryItem = (extension, locale) => ({
4343
let cachedGallery = null;
4444

4545
const fetchLibrary = async () => {
46-
const res = await fetch(APP_DOMAIN+'/extensions/extensions.json');
46+
const res = await fetch(API_HOST+'/extensions/extensions.json');
4747
if (!res.ok) {
4848
throw new Error(`HTTP status ${res.status}`);
4949
}
@@ -54,8 +54,8 @@ const fetchLibrary = async () => {
5454
description: extension.description,
5555
descriptionTranslations: extension.descriptionTranslations || {},
5656
extensionId: extension.id,
57-
extensionURL: APP_DOMAIN+ `/extensions/extensions/${extension.slug}.js`,
58-
iconURL: APP_DOMAIN +`/extensions/${extension.image || 'images/unknown.svg'}`,
57+
extensionURL: API_HOST+ `/extensions/extensions/${extension.slug}.js`,
58+
iconURL: API_HOST +`/extensions/${extension.image || 'images/unknown.svg'}`,
5959
tags: ['tw'],
6060
credits: [
6161
...(extension.original || []),

0 commit comments

Comments
 (0)