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