Skip to content

Commit

Permalink
chore: move contentful stuff to config
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Nov 13, 2024
1 parent d65ff0c commit 904e8be
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/components/Navbar/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const getExtraButton = async () => {
}
}
try {
const SPACE_ID = 'ea2ybdmmn1kv'
const ENV = 'master'
const ACCESS_TOKEN = '9dieh3AHS6uwb_YNMjxlO6FCibAFFJVdg2YzA5t6U-Y'
const ENTRY_ID = '18g1DzIyBxvu0steSwKyQr'
const SPACE_ID = config.get('CONTENTFUL_SPACE_ID')
const ENV = config.get('CONTENTFUL_ENV')
const ACCESS_TOKEN = config.get('CONTENTFUL_NAVBAR_ACCESS_TOKEN')
const ENTRY_ID = config.get('CONTENTFUL_NAVBAR_ENTRY_ID')
const CONTENTFUL_URL = `https://cdn.contentful.com/spaces/${SPACE_ID}/environments/${ENV}/entries/${ENTRY_ID}?access_token=${ACCESS_TOKEN}`
const response = await fetch(CONTENTFUL_URL)
const entry = await response.json()
Expand Down
8 changes: 6 additions & 2 deletions src/config/env/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
"DOCS_DAO_URL": "https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",
"BLOG_URL": "https://decentraland.zone/blog/",
"LANDING_CREATORS_URL": "https://decentraland.zone/create/",
"DOWNLOAD_URL": "https://decentraland.zone/download/"
}
"DOWNLOAD_URL": "https://decentraland.zone/download/",
"CONTENTFUL_SPACE_ID": "ea2ybdmmn1kv",
"CONTENTFUL_ENV": "master",
"CONTENTFUL_NAVBAR_ACCESS_TOKEN": "9dieh3AHS6uwb_YNMjxlO6FCibAFFJVdg2YzA5t6U-Y",
"CONTENTFUL_NAVBAR_ENTRY_ID": "18g1DzIyBxvu0steSwKyQr"
}
8 changes: 6 additions & 2 deletions src/config/env/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
"DOCS_DAO_URL": "https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",
"BLOG_URL": "https://decentraland.org/blog/",
"LANDING_CREATORS_URL": "https://decentraland.org/create/",
"DOWNLOAD_URL": "https://decentraland.org/download/"
}
"DOWNLOAD_URL": "https://decentraland.org/download/",
"CONTENTFUL_SPACE_ID": "ea2ybdmmn1kv",
"CONTENTFUL_ENV": "master",
"CONTENTFUL_NAVBAR_ACCESS_TOKEN": "9dieh3AHS6uwb_YNMjxlO6FCibAFFJVdg2YzA5t6U-Y",
"CONTENTFUL_NAVBAR_ENTRY_ID": "18g1DzIyBxvu0steSwKyQr"
}
8 changes: 6 additions & 2 deletions src/config/env/stg.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
"DOCS_DAO_URL": "https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",
"BLOG_URL": "https://decentraland.today/blog/",
"LANDING_CREATORS_URL": "https://decentraland.today/create/",
"DOWNLOAD_URL": "https://decentraland.todat/download/"
}
"DOWNLOAD_URL": "https://decentraland.todat/download/",
"CONTENTFUL_SPACE_ID": "ea2ybdmmn1kv",
"CONTENTFUL_ENV": "master",
"CONTENTFUL_NAVBAR_ACCESS_TOKEN": "9dieh3AHS6uwb_YNMjxlO6FCibAFFJVdg2YzA5t6U-Y",
"CONTENTFUL_NAVBAR_ENTRY_ID": "18g1DzIyBxvu0steSwKyQr"
}

0 comments on commit 904e8be

Please sign in to comment.