Skip to content

Commit

Permalink
fix: expanded routes view doesn't hide on review page
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Feb 16, 2024
1 parent 3a9f21e commit 95828f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/widget/src/components/Routes/RoutesExpanded.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ const routes: RouteObject[] = [
];

export const RoutesExpanded = () => {
const match = useDOMRoutes(routes);
const element = useDOMRoutes(routes);
const match = Boolean(element?.props?.children);

return (
<CollapseContainer>
<Collapse timeout={timeout} in={!!match} orientation="horizontal">
<Grow timeout={timeout} in={!!match} mountOnEnter unmountOnExit>
<Collapse timeout={timeout} in={match} orientation="horizontal">
<Grow timeout={timeout} in={match} mountOnEnter unmountOnExit>
<div>
<RoutesExpandedElement />
</div>
Expand Down

0 comments on commit 95828f2

Please sign in to comment.