Skip to content

Commit 04b98bb

Browse files
committed
Rename some more constants
1 parent ee07d04 commit 04b98bb

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

source/views/contacts/contact-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {ContactType} from './types'
1515
import type {TopLevelViewPropsType} from '../types'
1616
import {GH_PAGES_URL} from '../../globals'
1717

18-
const GITHUB_URL = GH_PAGES_URL('contact-info.json')
18+
const contactInfoUrl = GH_PAGES_URL('contact-info.json')
1919

2020
const groupContacts = (contacts: ContactType[]) => {
2121
const grouped = groupBy(contacts, c => c.category)
@@ -70,7 +70,7 @@ export class ContactsListView extends React.PureComponent<Props, State> {
7070
}
7171

7272
fetchData = async () => {
73-
let {data: contacts} = await fetchJson(GITHUB_URL).catch(err => {
73+
let {data: contacts} = await fetchJson(contactInfoUrl).catch(err => {
7474
reportNetworkProblem(err)
7575
return defaultData
7676
})

source/views/dictionary/list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import deburr from 'lodash/deburr'
2323
import * as defaultData from '../../../docs/dictionary.json'
2424
import {GH_PAGES_URL} from '../../globals'
2525

26-
const GITHUB_URL = GH_PAGES_URL('dictionary.json')
26+
const dictionaryUrl = GH_PAGES_URL('dictionary.json')
2727

2828
const ROW_HEIGHT = Platform.OS === 'ios' ? 76 : 89
2929
const SECTION_HEADER_HEIGHT = Platform.OS === 'ios' ? 33 : 41
@@ -85,7 +85,7 @@ export class DictionaryView extends React.PureComponent<Props, State> {
8585
}
8686

8787
fetchData = async () => {
88-
let {data: allTerms} = await fetchJson(GITHUB_URL).catch(err => {
88+
let {data: allTerms} = await fetchJson(dictionaryUrl).catch(err => {
8989
reportNetworkProblem(err)
9090
return defaultData
9191
})

source/views/streaming/webcams/list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {Webcam} from './types'
1212
import {StreamThumbnail} from './thumbnail'
1313
import {GH_PAGES_URL} from '../../../globals'
1414

15-
const GITHUB_URL = GH_PAGES_URL('webcams.json')
15+
const webcamsUrl = GH_PAGES_URL('webcams.json')
1616

1717
type Props = {}
1818

@@ -67,7 +67,7 @@ export class WebcamsView extends React.PureComponent<Props, State> {
6767
fetchData = async () => {
6868
this.setState(() => ({loading: true}))
6969

70-
let {data: webcams} = await fetchJson(GITHUB_URL).catch(err => {
70+
let {data: webcams} = await fetchJson(webcamsUrl).catch(err => {
7171
reportNetworkProblem(err)
7272
return defaultData
7373
})

source/views/transportation/bus/wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {GH_PAGES_URL} from '../../../globals'
1414

1515
const TIMEZONE = 'America/Winnipeg'
1616

17-
const GITHUB_URL = GH_PAGES_URL('bus-times.json')
17+
const busTimesUrl = GH_PAGES_URL('bus-times.json')
1818

1919
type Props = TopLevelViewPropsType & {
2020
+line: string,
@@ -55,7 +55,7 @@ export class BusView extends React.PureComponent<Props, State> {
5555
}
5656

5757
fetchData = async () => {
58-
let {data: busLines} = await fetchJson(GITHUB_URL).catch(err => {
58+
let {data: busLines} = await fetchJson(busTimesUrl).catch(err => {
5959
reportNetworkProblem(err)
6060
return defaultData
6161
})

source/views/transportation/other-modes/list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {TopLevelViewPropsType} from '../../types'
1515
import type {OtherModeType} from '../types'
1616
import {GH_PAGES_URL} from '../../../globals'
1717

18-
const GITHUB_URL = GH_PAGES_URL('transportation.json')
18+
const transportationUrl = GH_PAGES_URL('transportation.json')
1919

2020
const groupModes = (modes: OtherModeType[]) => {
2121
const grouped = groupBy(modes, m => m.category)
@@ -70,7 +70,7 @@ export class OtherModesView extends React.PureComponent<Props, State> {
7070
}
7171

7272
fetchData = async () => {
73-
let {data: modes} = await fetchJson(GITHUB_URL).catch(err => {
73+
let {data: modes} = await fetchJson(transportationUrl).catch(err => {
7474
reportNetworkProblem(err)
7575
return defaultData
7676
})

0 commit comments

Comments
 (0)