Skip to content

Commit a7c1262

Browse files
committed
Navigate to WorkspaceInitialPage on narrow layout in GettingStartedSection
1 parent 4bb453f commit a7c1262

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/home/GettingStartedSection/hooks/useGettingStartedItems.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import useCardFeeds from '@hooks/useCardFeeds';
22
import useLocalize from '@hooks/useLocalize';
33
import useOnyx from '@hooks/useOnyx';
4+
import useResponsiveLayout from '@hooks/useResponsiveLayout';
45
import {hasCompanyCardFeeds} from '@libs/CardUtils';
56
import {hasAccountingConnections, hasCustomCategories, hasNonDefaultRules, isPaidGroupPolicy, isPendingDeletePolicy} from '@libs/PolicyUtils';
67
import isWithinGettingStartedPeriod from '@pages/home/GettingStartedSection/utils/isWithinGettingStartedPeriod';
@@ -31,6 +32,7 @@ const DIRECT_CONNECT_INTEGRATIONS = new Set<string>([
3132

3233
function useGettingStartedItems(): UseGettingStartedItemsResult {
3334
const {translate} = useLocalize();
35+
const {shouldUseNarrowLayout} = useResponsiveLayout();
3436
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
3537
const [onboardingPurpose] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED);
3638
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
@@ -61,7 +63,7 @@ function useGettingStartedItems(): UseGettingStartedItemsResult {
6163
key: 'createWorkspace',
6264
label: translate('homePage.gettingStartedSection.createWorkspace'),
6365
isComplete: true,
64-
route: ROUTES.WORKSPACE_OVERVIEW.getRoute(activePolicyID),
66+
route: shouldUseNarrowLayout ? ROUTES.WORKSPACE_INITIAL.getRoute(activePolicyID) : ROUTES.WORKSPACE_OVERVIEW.getRoute(activePolicyID),
6567
});
6668

6769
const isDirectConnect = !!reportedIntegration && DIRECT_CONNECT_INTEGRATIONS.has(reportedIntegration);

0 commit comments

Comments
 (0)