Skip to content

Commit

Permalink
Merge pull request #450 from opentripplanner/remove-dead-links
Browse files Browse the repository at this point in the history
fix: remove dead links
  • Loading branch information
binh-dam-ibigroup authored Sep 8, 2021
2 parents 40940ed + 6227886 commit bdd8951
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 4 additions & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ api:
persistence:
enabled: true
strategy: localStorage
### This variable hides the "more info" link when accepting the terms of storage.
### If no terms of storage page content is set, this removes an otherwise dead link
### False is default in that if the value isn't set, the link isn't shown
# terms_of_storage: true

### If using the OTP Middleware to store user profiles
### with Auth0 as the authentication mechanism,
Expand Down
12 changes: 9 additions & 3 deletions lib/components/user/terms-of-use-pane.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { connect } from 'react-redux'
import { Checkbox, ControlLabel, FormGroup } from 'react-bootstrap'

import { TERMS_OF_SERVICE_PATH, TERMS_OF_STORAGE_PATH } from '../../util/constants'
Expand All @@ -10,6 +11,7 @@ const TermsOfUsePane = ({
disableCheckTerms,
handleBlur,
handleChange,
termsOfStorageSet,
values: userData
}) => {
const {
Expand Down Expand Up @@ -46,11 +48,15 @@ const TermsOfUsePane = ({
>
{/* TODO: Implement the link */}
Optional: I consent to the Trip Planner storing my historical planned trips in order to
improve transit services in my area. <a href={`/#${TERMS_OF_STORAGE_PATH}`} target='_blank'>More info...</a>
improve transit services in my area. {termsOfStorageSet && <a href={`/#${TERMS_OF_STORAGE_PATH}`} target='_blank'>More info...</a>}
</Checkbox>
</FormGroup>
</div>
)
}

export default TermsOfUsePane
const mapStateToProps = (state) => {
return {
termsOfStorageSet: state.otp.config.persistence?.terms_of_storage
}
}
export default connect(mapStateToProps)(TermsOfUsePane)
7 changes: 0 additions & 7 deletions lib/util/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ export const accountLinks = [
{
text: 'My account',
url: ACCOUNT_PATH
},
{
// Add a target attribute if you need the link to open in a new window, etc.
// (supports the same values as <a target=... >).
// target: '_blank',
text: 'Help',
url: '/help'
}
]

Expand Down

0 comments on commit bdd8951

Please sign in to comment.