Skip to content

Commit

Permalink
Cleanup isNavigatorName
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Nov 28, 2024
1 parent c7e18b6 commit 0274d43
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/libs/Navigation/helpers/isNavigatorName.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import RELATIONS from '@libs/Navigation/linkingConfig/RELATIONS';
import type {FullScreenName, OnboardingFlowName, SplitNavigatorName, SplitNavigatorSidebarScreen} from '@libs/Navigation/types';
import NAVIGATORS from '@src/NAVIGATORS';
import SCREENS from '@src/SCREENS';

const SPLIT_NAVIGATORS = [NAVIGATORS.WORKSPACE_SPLIT_NAVIGATOR, NAVIGATORS.REPORTS_SPLIT_NAVIGATOR, NAVIGATORS.SETTINGS_SPLIT_NAVIGATOR];
const FULL_SCREENS = [...SPLIT_NAVIGATORS, SCREENS.SEARCH.CENTRAL_PANE];
const SIDEBARS = [SCREENS.HOME, SCREENS.SETTINGS.ROOT, SCREENS.WORKSPACE.INITIAL];
const ONBOARDING_SCREENS = [
SCREENS.ONBOARDING.PERSONAL_DETAILS,
SCREENS.ONBOARDING.PURPOSE,
Expand All @@ -13,9 +10,9 @@ const ONBOARDING_SCREENS = [
SCREENS.ONBOARDING.ACCOUNTING,
];

const SPLIT_NAVIGATORS_SET = new Set(SPLIT_NAVIGATORS);
const FULL_SCREENS_SET = new Set(FULL_SCREENS);
const SIDEBARS_SET = new Set(SIDEBARS);
const SPLIT_NAVIGATORS_SET = new Set(Object.values(RELATIONS.SIDEBAR_TO_SPLIT));
const FULL_SCREENS_SET = new Set([...Object.values(RELATIONS.SIDEBAR_TO_SPLIT), SCREENS.SEARCH.CENTRAL_PANE]);
const SIDEBARS_SET = new Set(Object.values(RELATIONS.SPLIT_TO_SIDEBAR));
const ONBOARDING_SCREENS_SET = new Set(ONBOARDING_SCREENS);

/**
Expand Down

0 comments on commit 0274d43

Please sign in to comment.