Skip to content

Commit

Permalink
fix: update variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Aug 16, 2024
1 parent a05957a commit 1ea06e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/Navigation/OnyxTabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function OnyxTabNavigator({
}: OnyxTabNavigatorProps) {
// Mapping of tab name to focus trap container element
const [focusTrapContainerElementMapping, setFocusTrapContainerElementMapping] = useState<Record<string, HTMLElement>>({});
const [selectedTab, onyxFetchMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.SELECTED_TAB}${id}`);
const [selectedTab, selectedTabResult] = useOnyx(`${ONYXKEYS.COLLECTION.SELECTED_TAB}${id}`);

// This callback is used to register the focus trap container element of each avaiable tab screen
const setTabFocusTrapContainerElement = useCallback((tabName: string, containerElement: HTMLElement | null) => {
Expand Down Expand Up @@ -103,7 +103,7 @@ function OnyxTabNavigator({
onActiveTabFocusTrapContainerElementChanged?.(selectedTab ? focusTrapContainerElementMapping[selectedTab] : null);
}, [selectedTab, focusTrapContainerElementMapping, onActiveTabFocusTrapContainerElementChanged]);

if (isLoadingOnyxValue(onyxFetchMetadata)) {
if (isLoadingOnyxValue(selectedTabResult)) {
return null;
}

Expand Down

0 comments on commit 1ea06e8

Please sign in to comment.