ProfileLink.jsx crashes onClick if customOnClick prop is not given which cause Link.js to stop here. Then the page would reload instead of rerender. The onClick callback from ProfileLink is passed to SmarkLink.jsx -> NavLink.jsx -> Link.js.
This can be fixed by adding null check or a default prop in ProfileLink.jsx
In addition, I wondered if customOnClick prop should be added in ProfileLinks.jsx as well, so that it is configurable along with other props like isExternal, url or target
Issue Type
[ ] New Feature
[ ] Enhancement
[x] Bug
[ ] Other
Expected Behavior
The component would render for the matching ProfileLink route without a full reload of the page
Current Behavior
The page redirect to the route with a full reload.
Steps to Reproduce
Render ProfileLinks.jsx with multiple ProfileLink.jsx that has propisExternal: false with matching routes
Issue Description
ProfileLink.jsx crashes onClick if
customOnClick
prop is not given which cause Link.js to stop here. Then the page would reload instead of rerender. The onClick callback from ProfileLink is passed to SmarkLink.jsx -> NavLink.jsx -> Link.js.This can be fixed by adding null check or a default prop in ProfileLink.jsx
In addition, I wondered if
customOnClick
prop should be added in ProfileLinks.jsx as well, so that it is configurable along with other props likeisExternal
,url
ortarget
Issue Type
Expected Behavior
Current Behavior
Steps to Reproduce
isExternal: false
with matching routesEnvironment