Skip to content

Commit

Permalink
rename props to fix already declared names
Browse files Browse the repository at this point in the history
  • Loading branch information
drewvolz committed Sep 7, 2024
1 parent aabf07f commit ffbddf5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions source/views/building-hours/lib/chapel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function isChapelTime(
schedules: SingleBuildingScheduleType[] = chapelSchedule,
): boolean {
let dayOfWeek = getDayOfWeek(m)
let sched = schedules.find((sched) => sched.days.includes(dayOfWeek))
let sched = schedules.find((schedule) => schedule.days.includes(dayOfWeek))

if (!sched) {
return false
Expand All @@ -32,7 +32,7 @@ export function formatChapelTime(
schedules: SingleBuildingScheduleType[] = chapelSchedule,
): string {
let dayOfWeek = getDayOfWeek(m)
let sched = schedules.find((sched) => sched.days.includes(dayOfWeek))
let sched = schedules.find((schedule) => schedule.days.includes(dayOfWeek))

if (!sched) {
return 'No chapel'
Expand All @@ -46,7 +46,7 @@ export function getTimeUntilChapelCloses(
schedules: SingleBuildingScheduleType[] = chapelSchedule,
): string {
let dayOfWeek = getDayOfWeek(m)
let sched = schedules.find((sched) => sched.days.includes(dayOfWeek))
let sched = schedules.find((schedule) => schedule.days.includes(dayOfWeek))

if (!sched) {
return 'No chapel'
Expand Down
4 changes: 2 additions & 2 deletions source/views/contacts/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export let ContactsListView = (): JSX.Element => {
} = useGroupedContacts()

let onPressContact = React.useCallback(
(data: ContactType) =>
navigation.navigate(DetailNavigationKey, {contact: data}),
(contactData: ContactType) =>
navigation.navigate(DetailNavigationKey, {contact: contactData}),
[navigation],
)

Expand Down
8 changes: 4 additions & 4 deletions source/views/dictionary/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function termToArray(term: WordType) {
)
}

function groupWords(words: WordType[]): DictionaryGroup[] {
let grouped = groupBy(words, (w) => w.word[0] || '?')
function groupWords(wordsToGroup: WordType[]): DictionaryGroup[] {
let grouped = groupBy(wordsToGroup, (w) => w.word[0] || '?')
return Object.entries(grouped).map(([k, v]) => ({
title: k,
data: v,
Expand Down Expand Up @@ -82,8 +82,8 @@ function DictionaryView(): JSX.Element {
let grouped = groupWords(data)
let filteredData = []
for (let {title, data: items} of grouped) {
let filteredItems = items.filter((value) =>
termToArray(value).some((value) => value.includes(searchQuery)),
let filteredItems = items.filter((item) =>
termToArray(item).some((value) => value.includes(searchQuery)),
)
if (filteredItems.length) {
filteredData.push({title, data: items})
Expand Down

0 comments on commit ffbddf5

Please sign in to comment.