You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'm just trying to find how to add the pathname function from NextJS, specifically in the Sidebar Icon when it's open and its have a specific path.
I want that the icon of the sidebar change its color when it is in a specific href path, like adding this function:
className={ ${ pathname === child.path ? "text-[#008296]" : "" }}
There is any kind of way to add this funcionality?
This discussion was converted from issue #1071 on October 18, 2023 07:59.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I'm just trying to find how to add the pathname function from NextJS, specifically in the Sidebar Icon when it's open and its have a specific path.
I want that the icon of the sidebar change its color when it is in a specific href path, like adding this function:
className={
${ pathname === child.path ? "text-[#008296]" : "" }
}There is any kind of way to add this funcionality?
Beta Was this translation helpful? Give feedback.
All reactions