fix React.JSX

This commit is contained in:
Samuel Newman
2025-05-17 15:48:47 -07:00
parent f10360406f
commit adb3c82d7c
3 changed files with 15 additions and 15 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import * as React from 'react'
import {type JSX, useCallback, useRef} from 'react'
import {i18n, type MessageDescriptor} from '@lingui/core'
import {msg} from '@lingui/macro'
import {
@@ -484,8 +484,8 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
* in 3 distinct tab-stacks with a different root screen on each.
*/
function TabsNavigator() {
const tabBar = React.useCallback(
(props: React.JSX.IntrinsicAttributes & BottomTabBarProps) => (
const tabBar = useCallback(
(props: JSX.IntrinsicAttributes & BottomTabBarProps) => (
<BottomBar {...props} />
),
[],
@@ -712,7 +712,7 @@ const LINKING = {
function RoutesContainer({children}: React.PropsWithChildren<{}>) {
const theme = useColorSchemeStyle(DefaultTheme, DarkTheme)
const {currentAccount} = useSession()
const prevLoggedRouteName = React.useRef<string | undefined>(undefined)
const prevLoggedRouteName = useRef<string | undefined>(undefined)
const emailDialogControl = useEmailDialogControl()
function onReady() {
+4 -4
View File
@@ -1,4 +1,4 @@
import * as React from 'react'
import React, {type JSX} from 'react'
import {
type LayoutChangeEvent,
type NativeScrollEvent,
@@ -39,15 +39,15 @@ export interface PagerWithHeaderChildParams {
export interface PagerWithHeaderProps {
testID?: string
children:
| (((props: PagerWithHeaderChildParams) => React.JSX.Element) | null)[]
| ((props: PagerWithHeaderChildParams) => React.JSX.Element)
| (((props: PagerWithHeaderChildParams) => JSX.Element) | null)[]
| ((props: PagerWithHeaderChildParams) => JSX.Element)
items: string[]
isHeaderReady: boolean
renderHeader?: ({
setMinimumHeight,
}: {
setMinimumHeight: (height: number) => void
}) => React.JSX.Element
}) => JSX.Element
initialPage?: number
onPageSelected?: (index: number) => void
onCurrentPageSelected?: (index: number) => void
+7 -7
View File
@@ -1,4 +1,4 @@
import * as React from 'react'
import React, {type JSX} from 'react'
import {type ScrollView, View} from 'react-native'
import {useAnimatedRef} from 'react-native-reanimated'
@@ -21,15 +21,15 @@ export interface PagerWithHeaderChildParams {
export interface PagerWithHeaderProps {
testID?: string
children:
| (((props: PagerWithHeaderChildParams) => React.JSX.Element) | null)[]
| ((props: PagerWithHeaderChildParams) => React.JSX.Element)
| (((props: PagerWithHeaderChildParams) => JSX.Element) | null)[]
| ((props: PagerWithHeaderChildParams) => JSX.Element)
items: string[]
isHeaderReady: boolean
renderHeader?: ({
setMinimumHeight,
}: {
setMinimumHeight: () => void
}) => React.JSX.Element
}) => JSX.Element
initialPage?: number
onPageSelected?: (index: number) => void
onCurrentPageSelected?: (index: number) => void
@@ -127,11 +127,11 @@ let PagerTabBar = ({
setMinimumHeight,
}: {
setMinimumHeight: () => void
}) => React.JSX.Element
}) => JSX.Element
isHeaderReady: boolean
onCurrentPageSelected?: (index: number) => void
onSelect?: (index: number) => void
tabBarAnchor?: React.JSX.Element | null | undefined
tabBarAnchor?: JSX.Element | null | undefined
}): React.ReactNode => {
return (
<>
@@ -168,7 +168,7 @@ function PagerItem({
renderTab,
}: {
isFocused: boolean
renderTab: ((props: PagerWithHeaderChildParams) => React.JSX.Element) | null
renderTab: ((props: PagerWithHeaderChildParams) => JSX.Element) | null
}) {
const scrollElRef = useAnimatedRef()
if (renderTab == null) {