diff --git a/example-config.yml b/example-config.yml
index 95fb8ca8f..889ba5ab8 100644
--- a/example-config.yml
+++ b/example-config.yml
@@ -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,
diff --git a/lib/components/user/terms-of-use-pane.js b/lib/components/user/terms-of-use-pane.js
index e7c0e94fd..e7d860412 100644
--- a/lib/components/user/terms-of-use-pane.js
+++ b/lib/components/user/terms-of-use-pane.js
@@ -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'
@@ -10,6 +11,7 @@ const TermsOfUsePane = ({
disableCheckTerms,
handleBlur,
handleChange,
+ termsOfStorageSet,
values: userData
}) => {
const {
@@ -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. More info...
+ improve transit services in my area. {termsOfStorageSet && More info...}
)
}
-
-export default TermsOfUsePane
+const mapStateToProps = (state) => {
+ return {
+ termsOfStorageSet: state.otp.config.persistence?.terms_of_storage
+ }
+}
+export default connect(mapStateToProps)(TermsOfUsePane)
diff --git a/lib/util/auth.js b/lib/util/auth.js
index e96aae9d4..4d4a940f2 100644
--- a/lib/util/auth.js
+++ b/lib/util/auth.js
@@ -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 ).
- // target: '_blank',
- text: 'Help',
- url: '/help'
}
]