Skip to content

Commit

Permalink
Remove SearchRouter dev check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicu committed Oct 4, 2024
1 parent 635e0da commit 078420e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
5 changes: 0 additions & 5 deletions src/components/Search/SearchRouter/SearchButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import Performance from '@libs/Performance';
import Permissions from '@libs/Permissions';
import * as Session from '@userActions/Session';
import Timing from '@userActions/Timing';
import CONST from '@src/CONST';
Expand All @@ -18,10 +17,6 @@ function SearchButton() {
const {translate} = useLocalize();
const {openSearchRouter} = useSearchRouterContext();

if (!Permissions.canUseNewSearchRouter()) {
return;
}

return (
<PressableWithoutFeedback
accessibilityLabel={translate('common.search')}
Expand Down
13 changes: 0 additions & 13 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type {OnyxEntry} from 'react-native-onyx';
import CONST from '@src/CONST';
import type {IOUType} from '@src/CONST';
import type Beta from '@src/types/onyx/Beta';
import * as Environment from './Environment/Environment';

function canUseAllBetas(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.ALL);
Expand Down Expand Up @@ -50,17 +49,6 @@ function canUseCombinedTrackSubmit(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.COMBINED_TRACK_SUBMIT);
}

/**
* New Search Router is under construction and for now should be displayed only in dev to allow developers to work on it.
* We are not using BETA for this feature, as betas are heavier to cleanup,
* and the development of new router is expected to take 2-3 weeks at most
*
* After everything is implemented this function can be removed, as we will always use SearchRouter in the App.
*/
function canUseNewSearchRouter() {
return Environment.isDevelopment();
}

/**
* Link previews are temporarily disabled.
*/
Expand All @@ -80,5 +68,4 @@ export default {
canUseNewDotCopilot,
canUseWorkspaceRules,
canUseCombinedTrackSubmit,
canUseNewSearchRouter,
};
1 change: 0 additions & 1 deletion tests/perf-test/SearchRouter.perf-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type {PersonalDetails, Report} from '@src/types/onyx';
import createCollection from '../utils/collections/createCollection';
import createPersonalDetails from '../utils/collections/personalDetails';
import createRandomReport from '../utils/collections/reports';
import createAddListenerMock from '../utils/createAddListenerMock';
import * as TestHelper from '../utils/TestHelper';
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates';
Expand Down

0 comments on commit 078420e

Please sign in to comment.