Skip to content

Commit 3f4d339

Browse files
yann300Aniket-Engg
authored andcommitted
Fix pulling BaseURL
1 parent b6e5b6a commit 3f4d339

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
export const HOME_TAB_BASE_URL = process.env.CIRCLE_BRANCH === 'remix_beta' ?
2-
'https://raw.githubusercontent.com/remix-project-org/remix-dynamics/refs/heads/beta/' : process.env.CIRCLE_BRANCH === 'remix_live' ?
3-
'https://raw.githubusercontent.com/remix-project-org/remix-dynamics/refs/heads/live/' :
4-
'https://raw.githubusercontent.com/remix-project-org/remix-dynamics/refs/heads/alpha/'
1+
const branches = {
2+
'remix-beta.ethereum.org': 'beta',
3+
'remix-alpha.ethereum.org': 'alpha',
4+
'remix.ethereum.org': 'live'
5+
}
56

7+
const getBaseUrl = () => {
8+
const branch = branches[window.location.hostname] || 'live'
9+
return `https://raw.githubusercontent.com/remix-project-org/remix-dynamics/refs/heads/${branch}/`
10+
}
11+
12+
export const HOME_TAB_BASE_URL = getBaseUrl()
613
export const HOME_TAB_NEW_UPDATES = HOME_TAB_BASE_URL + 'hometab/new-updates.json'
7-
export const HOME_TAB_PLUGIN_LIST = HOME_TAB_BASE_URL + 'hometab/plugin-list.json'
14+
export const HOME_TAB_PLUGIN_LIST = HOME_TAB_BASE_URL + 'hometab/plugin-list.json'

0 commit comments

Comments
 (0)