Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/pages/Share/ShareRootPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useCallback, useEffect, useRef, useState} from 'react';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {Alert, AppState, InteractionManager, View} from 'react-native';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import type {AnimatedTextInputRef} from '@components/RNTextInput';
Expand All @@ -16,6 +16,7 @@ import Navigation from '@libs/Navigation/Navigation';
import OnyxTabNavigator, {TopTab} from '@libs/Navigation/OnyxTabNavigator';
import {shouldValidateFile} from '@libs/ReceiptUtils';
import ShareActionHandler from '@libs/ShareActionHandlerModule';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {close as closeModal} from '@userActions/Modal';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -155,6 +156,14 @@ function ShareRootPage() {
closeModal();
}, []);

const reasonAttributes = useMemo<SkeletonSpanReasonAttributes>(
() => ({
context: 'ShareRootPage',
isFileReady,
}),
[isFileReady],
);

const shareTabInputRef = useRef<AnimatedTextInputRef | null>(null);
const submitTabInputRef = useRef<AnimatedTextInputRef | null>(null);

Expand Down Expand Up @@ -197,7 +206,7 @@ function ShareRootPage() {
{isFileScannable && <TopTab.Screen name={CONST.TAB.SHARE.SUBMIT}>{() => <SubmitTab ref={submitTabInputRef} />}</TopTab.Screen>}
</OnyxTabNavigator>
) : (
<TabNavigatorSkeleton />
<TabNavigatorSkeleton reasonAttributes={reasonAttributes} />
)}
</View>
</ScreenWrapper>
Expand Down
Loading