Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEX] Sergei / FEQ - 2310, 2311, 2319, 2320, 2344 / Tablet view issues #3 #15522

Merged
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions packages/shared/src/utils/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export const routes = {
};

export const DISABLE_LANDSCAPE_BLOCKER_ROUTES = [
routes.traders_hub,
routes.trade,
routes.onboarding,
routes.compare_cfds,
Expand All @@ -113,5 +112,8 @@ export const DISABLE_LANDSCAPE_BLOCKER_ROUTES = [
'/contract',
];

export const isDisabledLandscapeBlockerRoute = (path: string) =>
DISABLE_LANDSCAPE_BLOCKER_ROUTES.some(route => path.startsWith(route));
export const isDisabledLandscapeBlockerRoute = (path: string) => {
// can't use routes.traders_hub for the next check because all routes starts with '/'
if (path === routes.traders_hub) return true;
return DISABLE_LANDSCAPE_BLOCKER_ROUTES.some(route => path.startsWith(route));
};