Skip to content

Commit

Permalink
update config types
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed Dec 6, 2023
1 parent 8038f2c commit 569fa74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/components/user/terms-of-use-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux'
import { FormattedMessage, useIntl } from 'react-intl'
import React, { FormEventHandler } from 'react'

import { AppReduxState } from '../../util/state-types'
import { LinkOpensNewWindow } from '../util/externalLink'
import {
TERMS_OF_SERVICE_PATH,
Expand All @@ -24,7 +25,7 @@ const TermsOfUsePane = ({
handleBlur: () => void
handleChange: FormEventHandler<Checkbox>
locale: string
termsOfServiceLink: string
termsOfServiceLink?: string
values: {
hasConsentedToTerms: boolean
storeTripHistory: boolean
Expand Down Expand Up @@ -101,7 +102,7 @@ const TermsOfUsePane = ({
</div>
)
}
const mapStateToProps = (state: any) => {
const mapStateToProps = (state: AppReduxState) => {
return {
locale: state.otp.ui?.locale,
termsOfServiceLink: state.otp.config.termsOfServiceLink,
Expand Down
6 changes: 5 additions & 1 deletion lib/util/config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ export type PersistenceConfig = (
| LocalPersistenceConfig
| MiddlewarePersistenceConfig
) & {
enabled?: boolean
enabled?: boolean | undefined
// eslint-disable-next-line camelcase
terms_of_storage?: boolean | undefined
}

/** Popup target settings */
Expand Down Expand Up @@ -370,6 +372,8 @@ export interface AppConfig {
/** Whether to show the x minutes late/early in the itinerary body */
showScheduleDeviation?: boolean
stopViewer?: StopViewerConfig
/** Externally hosted terms of service URL */
termsOfServiceLink?: string
/** App title shown in the browser title bar. */
title?: string
transitOperators?: TransitOperatorConfig[]
Expand Down

0 comments on commit 569fa74

Please sign in to comment.