mirror of
https://github.com/tooot-app/app
synced 2025-02-23 15:17:38 +01:00
Done #79
This commit is contained in:
parent
122dae7404
commit
371830ff19
@ -1,4 +1,5 @@
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { TabMeStackNavigationProp } from '@utils/navigation/navigators'
|
||||
import addInstance from '@utils/slices/instances/add'
|
||||
import { Instance } from '@utils/slices/instancesSlice'
|
||||
import * as AuthSession from 'expo-auth-session'
|
||||
@ -21,7 +22,9 @@ const InstanceAuth = React.memo(
|
||||
useProxy: false
|
||||
})
|
||||
|
||||
const navigation = useNavigation()
|
||||
const navigation = useNavigation<
|
||||
TabMeStackNavigationProp<'Tab-Me-Root' | 'Tab-Me-Switch'>
|
||||
>()
|
||||
const queryClient = useQueryClient()
|
||||
const dispatch = useDispatch()
|
||||
|
||||
|
@ -6,6 +6,7 @@ import AttachmentImage from '@components/Timeline/Shared/Attachment/Image'
|
||||
import AttachmentUnsupported from '@components/Timeline/Shared/Attachment/Unsupported'
|
||||
import AttachmentVideo from '@components/Timeline/Shared/Attachment/Video'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { RootStackParamList } from '@utils/navigation/navigators'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import layoutAnimation from '@utils/styles/layoutAnimation'
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react'
|
||||
@ -35,7 +36,7 @@ const TimelineAttachment = React.memo(
|
||||
}, [])
|
||||
|
||||
const imageUrls = useRef<
|
||||
Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls']
|
||||
RootStackParamList['Screen-ImagesViewer']['imageUrls']
|
||||
>([])
|
||||
const navigation = useNavigation()
|
||||
useEffect(() => {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import apiInstance from '@api/instance'
|
||||
import navigationRef from '@helpers/navigationRef'
|
||||
import { NavigationProp, ParamListBase } from '@react-navigation/native'
|
||||
import { store } from '@root/store'
|
||||
import { SearchResult } from '@utils/queryHooks/search'
|
||||
import { getInstanceUrl } from '@utils/slices/instancesSlice'
|
||||
@ -22,24 +21,7 @@ const matcherAccount = new RegExp(
|
||||
|
||||
export let loadingLink = false
|
||||
|
||||
const openLink = async (
|
||||
url: string,
|
||||
navigation?: NavigationProp<
|
||||
ParamListBase,
|
||||
string,
|
||||
Readonly<{
|
||||
key: string
|
||||
index: number
|
||||
routeNames: string[]
|
||||
history?: unknown[] | undefined
|
||||
routes: any[]
|
||||
type: string
|
||||
stale: false
|
||||
}>,
|
||||
{},
|
||||
{}
|
||||
>
|
||||
) => {
|
||||
const openLink = async (url: string, navigation?: any) => {
|
||||
if (loadingLink) {
|
||||
return
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { BottomTabScreenProps } from '@react-navigation/bottom-tabs'
|
||||
import { NavigatorScreenParams } from '@react-navigation/native'
|
||||
import { NativeStackScreenProps } from '@react-navigation/native-stack'
|
||||
import { StackNavigationProp } from '@react-navigation/stack'
|
||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||
|
||||
export type RootStackParamList = {
|
||||
@ -155,6 +156,9 @@ export type TabMeStackParamList = {
|
||||
export type TabMeStackScreenProps<
|
||||
T extends keyof TabMeStackParamList
|
||||
> = NativeStackScreenProps<TabMeStackParamList, T>
|
||||
export type TabMeStackNavigationProp<
|
||||
RouteName extends keyof TabMeStackParamList
|
||||
> = StackNavigationProp<TabMeStackParamList, RouteName>
|
||||
|
||||
export type TabMeProfileStackParamList = {
|
||||
'Tab-Me-Profile-Root': undefined
|
||||
|
Loading…
x
Reference in New Issue
Block a user