score:4

Accepted answer
<Link href={path}>
  <a
    className={
      router.pathname === classPath ?
      'wave-effect waves-effect waves-button active' : ''
    }
  >
    <i aria-hidden className={`width18 textCenter ${icon}`}></i>
    {title}
  </a>
</Link>

score:0

<a className={
   router.pathname == classPath ?
   'wave-effect waves-effect waves-button active':''
   }
>

Related Query

More Query from same tag