Resolve all remaining lint issues (#88)

* Rework 'navIdx' variables from number arrays to strings to avoid equality-check failures in react hooks

* Resolve all remaining lint issues

* Fix tests

* Use node v18 in gh action test
This commit is contained in:
Paul Frazee
2023-01-24 13:00:11 -06:00
committed by GitHub
parent 4b1fe49132
commit d054a69bcf
60 changed files with 478 additions and 482 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import {HorzSwipe} from './gestures/HorzSwipe'
import {useAnimatedValue} from '../../lib/hooks/useAnimatedValue'
import {OnScrollCb} from '../../lib/hooks/useOnMainScroll'
import {clamp} from '../../../lib/numbers'
import {s} from '../../lib/styles'
const HEADER_ITEM = {_reactKey: '__header__'}
const SELECTOR_ITEM = {_reactKey: '__selector__'}
@@ -54,7 +55,7 @@ export function ViewSelector({
setSelectedIndex(clamp(index, 0, sections.length))
useEffect(() => {
onSelectView?.(selectedIndex)
}, [selectedIndex])
}, [selectedIndex, onSelectView])
// rendering
// =
@@ -98,7 +99,7 @@ export function ViewSelector({
onScroll={onScroll}
onRefresh={onRefresh}
onEndReached={onEndReached}
contentContainerStyle={{paddingBottom: 200}}
contentContainerStyle={s.contentContainer}
/>
</HorzSwipe>
)