diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b71feedd..781ee35d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,7 @@ jobs: runs-on: ubuntu-latest env: REACT_APP_API_URL: ${{ secrets.API_URL }} + REACT_APP_PB_APP_URL: ${{ secrets.APP_URL }} REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} REACT_APP_VERSION: ${{github.ref_name}} if: startsWith(github.ref, 'refs/tags') @@ -55,6 +56,7 @@ jobs: runs-on: macos-latest env: REACT_APP_API_URL: ${{ secrets.API_URL }} + REACT_APP_PB_APP_URL: ${{ secrets.APP_URL }} REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} REACT_APP_VERSION: ${{github.ref_name}} if: startsWith(github.ref, 'refs/tags') @@ -77,6 +79,7 @@ jobs: runs-on: windows-latest env: REACT_APP_API_URL: ${{ secrets.API_URL }} + REACT_APP_PB_APP_URL: ${{ secrets.APP_URL }} REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} REACT_APP_VERSION: ${{github.ref_name}} if: startsWith(github.ref, 'refs/tags') @@ -99,6 +102,7 @@ jobs: runs-on: ubuntu-latest env: REACT_APP_API_URL: ${{ secrets.API_URL }} + REACT_APP_PB_APP_URL: ${{ secrets.APP_URL }} REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} REACT_APP_VERSION: ${{github.ref_name}} if: github.event_name == 'push' && github.ref == 'refs/heads/develop' diff --git a/sample.env b/sample.env index b4631e84..60809d81 100644 --- a/sample.env +++ b/sample.env @@ -1,4 +1,4 @@ REACT_APP_API_URL=http://localhost:3001 -REACT_APP_APP_URL=http://localhost:3000 +REACT_APP_PB_APP_URL=http://localhost:3000 REACT_APP_VERSION=$npm_package_version REACT_APP_GOOGLE_ANALYTICS_KEY=G-xxxxxx #Not necessary, can be omitted for development \ No newline at end of file diff --git a/src/components/creator/Editor/ActionButtons/ShareChallenge/ShareButton.tsx b/src/components/creator/Editor/ActionButtons/ShareChallenge/ShareButton.tsx index 14e0f851..d632dd46 100644 --- a/src/components/creator/Editor/ActionButtons/ShareChallenge/ShareButton.tsx +++ b/src/components/creator/Editor/ActionButtons/ShareChallenge/ShareButton.tsx @@ -33,13 +33,8 @@ const ShareDialog = ({ open, setDialogOpen }: { open: boolean, setDialogOpen: (o const ShareModal = () => { const { shareId } = useContext(CreatorContext) - - const APP_URL = 'https://pilasbloques.program.ar/online' - const DEV_URL = 'localhost:3000' - const sharedLink = (process.env.NODE_ENV === 'production' ? APP_URL : DEV_URL) + `/#/desafio/guardado/${shareId}` - - //const link: string = `http://localhost:3000/#/desafio/guardado/${shareId}` + const sharedLink = process.env.REACT_APP_PB_APP_URL + `/#/desafio/guardado/${shareId}` return {shareId ?