Closed Harsh-Ojha closed 11 months ago
@Harsh-Ojha you have to use `
( backtick: the key to the left of the 1 in standard keyboards) instead of '
(single quote)
<li
key={Link.id}
className={`${
active === Link.title
? "text-white"
: "text-secondary"
} hover:text-white text-[18px] font-medium cursor-pointer`}
onClick={()=> setActive(Link.title)}
>
<a href={`#${Link.id}`}>{Link.title}</a>
</li>
@Harsh-Ojha you have to use
`
( backtick: the key to the left of the 1 in standard keyboards) instead of'
(single quote)<li key={Link.id} className={`${ active === Link.title ? "text-white" : "text-secondary" } hover:text-white text-[18px] font-medium cursor-pointer`} onClick={()=> setActive(Link.title)} > <a href={`#${Link.id}`}>{Link.title}</a> </li>
Thanks @Tusharknwl, it worked for me.
The toggle function is not working, and I am unable to close or open the list manually. Please suggest some solution.