fix hydration error (button inside button)

This commit is contained in:
Sinclair Chen 2022-10-07 10:56:27 -07:00
parent 8f56ccad22
commit f0b35993c9

View File

@ -11,13 +11,13 @@ function SidebarButton(props: {
}) { }) {
const { text, children } = props const { text, children } = props
return ( return (
<button className="group flex w-full items-center rounded-md px-3 py-2 text-sm font-medium text-gray-600 hover:cursor-pointer hover:bg-gray-100"> <div className="group flex w-full items-center rounded-md px-3 py-2 text-sm font-medium text-gray-600 hover:cursor-pointer hover:bg-gray-100">
<props.icon <props.icon
className="-ml-1 mr-3 h-6 w-6 flex-shrink-0 text-gray-400 group-hover:text-gray-500" className="-ml-1 mr-3 h-6 w-6 flex-shrink-0 text-gray-400 group-hover:text-gray-500"
aria-hidden="true" aria-hidden="true"
/> />
<span className="truncate">{text}</span> <span className="truncate">{text}</span>
{children} {children}
</button> </div>
) )
} }