Skip to content

Commit

Permalink
chore: Back to display none
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 17, 2020
1 parent 7437cf7 commit c6f7852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const renderNav = (pages, depthLevel = 0) => {
)}
{pages.map((page) => {
const [isExpanded, setIsExpanded] = useState(
crumbs.includes(page.displayName)
crumbs.length === depthLevel || crumbs.includes(page.displayName)
);
const isCurrentPage = crumbs[crumbs.length - 1] === page.displayName;

Expand Down
6 changes: 2 additions & 4 deletions src/components/Sidebar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@

.nestedNav {
padding-left: 1rem;
height: 0;
visibility: hidden;
display: none;

&.isExpanded {
height: auto;
visibility: visible;
display: block;
}
}

Expand Down

0 comments on commit c6f7852

Please sign in to comment.