1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix ts warnings

This commit is contained in:
xmflsct
2023-02-11 22:04:32 +01:00
parent fcc53672fa
commit b679c0760f
19 changed files with 46 additions and 46 deletions

View File

@ -1,6 +1,6 @@
import { HeaderRight } from '@components/Header'
import Timeline from '@components/Timeline'
import SegmentedControl from '@react-native-community/segmented-control'
import SegmentedControl from '@react-native-segmented-control/segmented-control'
import { NativeStackScreenProps } from '@react-navigation/native-stack'
import { TabPublicStackParamList } from '@utils/navigation/navigators'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
@ -49,11 +49,12 @@ const Root: React.FC<NativeStackScreenProps<TabPublicStackParamList, 'Tab-Public
useEffect(() => {
navigation.setOptions({
headerTitle: () => (
// @ts-ignore
<SegmentedControl
appearance={mode}
values={routes.map(({ title }) => title)}
selectedIndex={segment}
onChange={({ nativeEvent }) => {
onChange={({ nativeEvent }: any) => {
setSegment(nativeEvent.selectedSegmentIndex)
setGlobalStorage('app.prev_public_segment', segments[nativeEvent.selectedSegmentIndex])
}}