That's what happens when you do things in a hurry, hahaah... You were right again. I made this change, what do you think? This was enough to get rid of the undefined.
undefined
export function ActiveLink({ children, activeClassName, ...rest }: ActiveLinkProps) { const { asPath } = useRouter(); const childClassName = children.props.className ?? ''; const newClassName = `${childClassName} ${activeClassName ?? ''}`; const className = asPath === rest.href ? newClassName.trim() : ''; return <Link {...rest}>{cloneElement(children, { className })}</Link>; }
This is better!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's what happens when you do things in a hurry, hahaah... You were right again. I made this change, what do you think? This was enough to get rid of the
undefined
.This is better!