Update dependencies and fix introduced errors

This commit is contained in:
Hazem Krimi
2023-03-19 00:17:48 +01:00
parent fad540e17b
commit c97cb80ce8
19 changed files with 1316 additions and 1311 deletions
+6 -8
View File
@@ -12,7 +12,7 @@ interface Props {
onClick?: () => void;
}
const Btn = styled.button`
const Btn = styled(Link)`
cursor: pointer;
background: none;
border: none;
@@ -30,15 +30,13 @@ const IconButton: FC<Props & { className?: string }> = ({
height = 24
}) => {
return !href ? (
<Btn onClick={onClick} className={className}>
<Image src={icon} width={width} height={height} />
<Btn href='#' onClick={onClick} className={className}>
<Image alt='' src={icon} width={width} height={height} />
</Btn>
) : (
<Link href={href} passHref>
<Btn as='a' target={target} onClick={onClick} className={className}>
<Image src={icon} width={width} height={height} />
</Btn>
</Link>
<Btn href={href} target={target} onClick={onClick} className={className}>
<Image alt='' src={icon} width={width} height={height} />
</Btn>
);
};