Skip to content

Commit f1dfbd8

Browse files
arthurdennerCompuIves
authored andcommitted
fix(dashboard): Properly highlight the trash menu when the route is active (codesandbox#2033)
1 parent 74d8eee commit f1dfbd8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/app/src/app/pages/Dashboard/Sidebar/TrashItem/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import { inject, observer } from 'mobx-react';
77

88
import Item from '../Item';
99

10-
const TrashItem = ({ isOver, canDrop, connectDropTarget }) =>
10+
const TrashItem = ({ currentPath, isOver, canDrop, connectDropTarget }) =>
1111
connectDropTarget(
1212
<div>
1313
<Item
14-
path={'/dashboard/trash'}
14+
active={currentPath === '/dashboard/trash'}
15+
path="/dashboard/trash"
1516
Icon={TrashIcon}
1617
name="Trash"
1718
style={

packages/app/src/app/pages/Dashboard/Sidebar/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Sidebar extends React.Component {
6969
currentTeamId={currentTeamId}
7070
openByDefault
7171
/>
72-
<TrashItem />
72+
<TrashItem currentPath={path} />
7373
</Items>
7474

7575
<Query query={TEAMS_QUERY}>

0 commit comments

Comments
 (0)