diff --git a/packages/pl-fe/src/features/ui/index.tsx b/packages/pl-fe/src/features/ui/index.tsx index 5ebd6b911..45d96af9a 100644 --- a/packages/pl-fe/src/features/ui/index.tsx +++ b/packages/pl-fe/src/features/ui/index.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import React, { Suspense, lazy, useEffect, useRef } from 'react'; -import { Redirect, Switch, useHistory, useLocation } from 'react-router-dom'; +import { matchPath, Redirect, Switch, useHistory, useLocation } from 'react-router-dom'; import { fetchConfig } from 'pl-fe/actions/admin'; import { fetchFilters } from 'pl-fe/actions/filters'; @@ -489,7 +489,7 @@ const UI: React.FC = React.memo(({ children }) => { pointerEvents: isDropdownMenuOpen ? 'none' : undefined, }; - const fullWidth = history.location.pathname.startsWith('/deck'); + const fullWidth = !!matchPath(history.location.pathname, '/deck'); return (