Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 3 additions & 8 deletions src/libs/Navigation/helpers/linkTo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,9 @@ export default function linkTo(navigation: NavigationContainerRef<RootNavigatorP
} else {
// Navigate within the existing TAB_NAVIGATOR (tab switch) rather than pushing a new one.
const lastRouteInMatchingFullScreen = matchingFullScreenRoute.state?.routes?.at(-1);
const additionalAction = CommonActions.navigate({
name: NAVIGATORS.TAB_NAVIGATOR,
params: {
screen: matchingFullScreenRoute.name,
params: lastRouteInMatchingFullScreen
? {screen: lastRouteInMatchingFullScreen.name, params: lastRouteInMatchingFullScreen.params}
: matchingFullScreenRoute.params,
},
const additionalAction = CommonActions.navigate(NAVIGATORS.TAB_NAVIGATOR, {
screen: matchingFullScreenRoute.name,
params: lastRouteInMatchingFullScreen ? {screen: lastRouteInMatchingFullScreen.name, params: lastRouteInMatchingFullScreen.params} : matchingFullScreenRoute.params,
});
navigation.dispatch(additionalAction);
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/CompanyCards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function addNewCompanyCardsFeed(
}

const feedType = CardUtils.getFeedType(cardFeed, cardFeeds);
const newSelectedFeed = getCardFeedWithDomainID(feedType, workspaceAccountID) as CompanyCardFeedWithDomainID;
const newSelectedFeed = getCardFeedWithDomainID(feedType, workspaceAccountID);

const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.LAST_SELECTED_FEED | typeof ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER>> = [
{
Expand Down Expand Up @@ -1275,7 +1275,7 @@ function importCSVCompanyCards({
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.LAST_SELECTED_FEED}${policyID}`,
value: feedNameWithDomainID as CompanyCardFeedWithDomainID,
value: feedNameWithDomainID,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function WorkspaceCompanyCardFeedSelectorPage({route}: WorkspaceCompanyCardFeedS
if (!feed.fundID) {
return;
}
const feedValue = getCardFeedWithDomainID(feed.feed, feed.fundID) as CompanyCardFeedWithDomainID;
const feedValue = getCardFeedWithDomainID(feed.feed, feed.fundID);
linkCardFeedToPolicy(feed.fundID, policyID, CONST.COMPANY_CARD.LINK_FEED_TYPE.COMPANY_CARD, feed?.country, feed.feed)
.then(() => {
updateSelectedFeed(feedValue, policyID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Navigation from '@navigation/Navigation';

import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {CardFeedProvider, CompanyCardFeedWithDomainID} from '@src/types/onyx/CardFeeds';
import type {CardFeedProvider} from '@src/types/onyx/CardFeeds';

import React from 'react';
import {View} from 'react-native';
Expand Down Expand Up @@ -59,7 +59,7 @@ function CardInstructionsStep({policyID}: CardInstructionsStepProps) {

const submit = () => {
if (isStripeFeedProvider && policyID) {
updateSelectedFeed(getCardFeedWithDomainID(feedProvider, workspaceAccountID) as CompanyCardFeedWithDomainID, policyID);
updateSelectedFeed(getCardFeedWithDomainID(feedProvider, workspaceAccountID), policyID);
Navigation.goBack();
return;
}
Expand Down
Loading