Skip to content

Commit

Permalink
fix(app-preview): Updates sidebar comparison logic (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlanciaux committed Jan 22, 2024
1 parent 3932595 commit 9b80edc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/preview/app/src/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const SidebarSection = ({
title = 'Email Templates'
}: SidebarSectionProps) => {
const { pathname: basePathName } = useLocation();
const pathname = basePathName.startsWith('/') ? basePathName.slice(1) : basePathName;
const pathname = decodeURIComponent(
basePathName.startsWith('/') ? basePathName.slice(1) : basePathName
);

const [isOpen, setIsOpen] = React.useState(
!isSubSection || pathname.indexOf(title.toLowerCase()) > -1
Expand Down

0 comments on commit 9b80edc

Please sign in to comment.