diff --git a/.github/workflows/build-development.yml b/.github/workflows/build-development.yml index b51542b7b2..5e095a1600 100644 --- a/.github/workflows/build-development.yml +++ b/.github/workflows/build-development.yml @@ -42,7 +42,7 @@ jobs: yarn run build env: REACT_APP_URL_SHORTENER_SIGNATURE: ${{ secrets.REACT_APP_URL_SHORTENER_SIGNATURE }} - REACT_APP_URL_SHORTENER_DOMAIN: ${{ secrets.REACT_APP_URL_SHORTENER_DOMAIN }} + REACT_APP_URL_SHORTENER_BASE: ${{ secrets.REACT_APP_URL_SHORTENER_BASE }} REACT_APP_SENTRY_DSN: ${{ secrets.REACT_APP_SENTRY_DSN }} REACT_APP_GOOGLE_CLIENT_ID: ${{ secrets.REACT_APP_GOOGLE_CLIENT_ID }} REACT_APP_GOOGLE_API_KEY: ${{ secrets.REACT_APP_GOOGLE_API_KEY }} diff --git a/src/commons/controlBar/ControlBarShareButton.tsx b/src/commons/controlBar/ControlBarShareButton.tsx index b7afc3b596..67055cb381 100644 --- a/src/commons/controlBar/ControlBarShareButton.tsx +++ b/src/commons/controlBar/ControlBarShareButton.tsx @@ -40,12 +40,6 @@ export class ControlBarShareButton extends React.PureComponent @@ -66,7 +60,7 @@ export class ControlBarShareButton extends React.PureComponent - {url}  + {Constants.urlShortenerBase}  { + Constants.urlShortenerBase = 'http://url-shortener.com/'; const errMsg = 'Something went wrong trying to create the link.'; test('puts changeQueryString action with undefined argument when passed the default value', () => { diff --git a/src/commons/utils/Constants.ts b/src/commons/utils/Constants.ts index 2d83f2011a..4fb647cc67 100644 --- a/src/commons/utils/Constants.ts +++ b/src/commons/utils/Constants.ts @@ -17,7 +17,7 @@ const defaultSourceVariant = 'default'; const defaultQuestionId = 0; const maxBrowseIndex = 50; const mobileBreakpoint = 768; -const urlShortener = process.env.REACT_APP_URL_SHORTENER_DOMAIN; +const urlShortenerBase = process.env.REACT_APP_URL_SHORTENER_BASE; const urlShortenerSignature = process.env.REACT_APP_URL_SHORTENER_SIGNATURE; const moduleBackendUrl = process.env.REACT_APP_MODULE_BACKEND_URL || 'modules'; const sharedbBackendUrl = process.env.REACT_APP_SHAREDB_BACKEND_URL || ''; @@ -110,7 +110,7 @@ const Constants = { defaultQuestionId, maxBrowseIndex, mobileBreakpoint, - urlShortener, + urlShortenerBase, urlShortenerSignature, moduleBackendUrl, authProviders,