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
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {useRoute} from '@react-navigation/native';
import React, {useCallback, useMemo} from 'react';
import React, {useMemo} from 'react';
import {View} from 'react-native';
import ConnectionLayout from '@components/ConnectionLayout';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import RenderHTML from '@components/RenderHTML';
import useDynamicBackPath from '@hooks/useDynamicBackPath';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import usePermissions from '@hooks/usePermissions';
Expand Down Expand Up @@ -48,9 +49,8 @@ function DynamicQuickbooksExportConfigurationPage({policy}: WithPolicyConnection
[qboConfig?.nonReimbursableExpensesExportDestination],
);

const goBack = useCallback(() => {
return goBackFromExportConnection(shouldShowVendorMenuItems, backTo);
}, [backTo, shouldShowVendorMenuItems]);
const dynamicBackPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT.path);
const goBack = () => goBackFromExportConnection(shouldShowVendorMenuItems, backTo, dynamicBackPath);

const menuItems = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/companyCards/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getExportMenuItem(
title: isDefaultTitle ? defaultCard : selectedAccount?.name,
exportType,
shouldShowMenuItem,
exportPageLink: createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT.path, basePath),
exportPageLink: createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT.path, backTo ?? basePath),
Comment thread
ryntgh marked this conversation as resolved.
Comment thread
ryntgh marked this conversation as resolved.
data: resultData.map((card) => ({
value: card.id,
text: card.name,
Expand Down
Loading