Skip to content

Commit

Permalink
Bug/203 links filter and video (#645)
Browse files Browse the repository at this point in the history
* moved feedback link to env variable and updated the header

* add keys to netlify and remove unused vars on header

Co-authored-by: Sudheer Kotha <[email protected]>
Co-authored-by: Sudheer Kotha <sudheer.kotha@[email protected]>
  • Loading branch information
3 people authored Aug 15, 2022
1 parent 4baf6db commit 10b2183
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ EXTEND_ESLINT=true # Set linting to true on dev
# developemnt API and keys
REACT_APP_API_HOST='https://wmca-api-portal-staging.azure-api.net'
REACT_APP_API_KEY='0d4cca4a2c5d40c3bfbbfe45d1bbf294'
# feedback link id
REACT_APP_FEEDBACK_LINK_URL='https://forms.office.com/Pages/ResponsePage.aspx'
REACT_APP_FEEDBACK_LINK_ID='RetZCK7xCk6e-ubWa7tnL1voVKMeFXVKvUhU3Uh8aqFUNUNVNFlKOVpLMThNV0g0T1VZWDYyT1FLNCQlQCN0PWcu'
# Bus autocomplete API and keys
REACT_APP_BUS_AUTOCOMPLETE_API='https://rtccdisruptionsbhrx2guer.azurewebsites.net'
# Roads autocomplete key
Expand Down
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Live API and keys
REACT_APP_API_HOST='https://api.wmnetwork.co.uk'
REACT_APP_API_KEY='514b8bafa009424289cb2d7a12c54f6e'
# feedback link id
REACT_APP_FEEDBACK_LINK_URL='https://forms.office.com/Pages/ResponsePage.aspx'
REACT_APP_FEEDBACK_LINK_ID='RetZCK7xCk6e-ubWa7tnL1voVKMeFXVKvUhU3Uh8aqFUNUNVNFlKOVpLMThNV0g0T1VZWDYyT1FLNCQlQCN0PWcu'
# Bus autocomplete API and keys
REACT_APP_BUS_AUTOCOMPLETE_API='https://rtccdisruptionsb5phceeso.azurewebsites.net'
# Roads autocomplete key
Expand Down
4 changes: 3 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ package = "@sentry/netlify-build-plugin"
REACT_APP_API_HOST='https://wmca-api-portal-staging.azure-api.net'
REACT_APP_API_KEY='0d4cca4a2c5d40c3bfbbfe45d1bbf294'
REACT_APP_BUS_AUTOCOMPLETE_API='https://rtccdisruptions6zqwajo6s.azurewebsites.net'
REACT_APP_ROADS_AUTOCOMPLETE_KEY='e0c1216f818a41be8d528ac1d4f7ebfd'
REACT_APP_ROADS_AUTOCOMPLETE_KEY='e0c1216f818a41be8d528ac1d4f7ebfd'
REACT_APP_FEEDBACK_LINK_URL='https://forms.office.com/Pages/ResponsePage.aspx'
REACT_APP_FEEDBACK_LINK_ID='RetZCK7xCk6e-ubWa7tnL1voVKMeFXVKvUhU3Uh8aqFUNUNVNFlKOVpLMThNV0g0T1VZWDYyT1FLNCQlQCN0PWcu'
3 changes: 2 additions & 1 deletion src/components/ViewToShow/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import s from './Header.module.scss';

const Header = ({ isFetching, hasError }) => {
const [fetchDisruptionState, setFetchDisruptionsState] = useContext(FetchDisruptionsContext);
const { REACT_APP_FEEDBACK_LINK_URL, REACT_APP_FEEDBACK_LINK_ID } = process.env; // Destructure env vars

const handleClick = () => {
let isMapVisible;
Expand Down Expand Up @@ -41,7 +42,7 @@ const Header = ({ isFetching, hasError }) => {
<p className="wmnds-banner-container__text">
This is a new service - your{' '}
<a
href="https://surveys.hotjar.com/s?siteId=264586&surveyId=157894"
href={`${REACT_APP_FEEDBACK_LINK_URL}?id=${encodeURI(REACT_APP_FEEDBACK_LINK_ID)}`}
title="Service feedback survey"
rel="noopener noreferrer"
target="_blank"
Expand Down

0 comments on commit 10b2183

Please sign in to comment.