Navbar highlighting does not work with Organized Content sections #181

Closed
opened 2021-08-25 19:36:59 -04:00 by a258wang · 1 comment
Owner

The navbar entries for pages that use the Organized Content are not blue when viewing only a section of the content. (The highlighting works fine when viewing "Read All.")
image

The navbar entries for pages that use the Organized Content are not blue when viewing only a section of the content. (The highlighting works fine when viewing "Read All.") ![image](/attachments/b61f9d66-7a6c-43bd-95b8-c2446d617f57)
a258wang added this to the Pre launch milestone 2021-08-25 19:37:11 -04:00
Owner

I think this is happening because of this code:

  const isCurrentPage =
    router.pathname === props.route ||
    (props.submenu != null &&
      router.pathname.startsWith(getMainRoute(props.route)));

In the organized content component, when you navigate to a section, we add the section slug to the route, so the router.pathname === props.route check will return false.

I think this is happening because of this code: ``` const isCurrentPage = router.pathname === props.route || (props.submenu != null && router.pathname.startsWith(getMainRoute(props.route))); ``` In the organized content component, when you navigate to a section, we add the section slug to the route, so the `router.pathname === props.route` check will return false.
a258wang was assigned by a3thakra 2021-08-26 22:38:16 -04:00
a3thakra added the
In Progress
label 2021-08-26 22:38:25 -04:00
a3thakra added the
Bug
label 2021-08-30 00:27:21 -04:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#181
No description provided.