Fix use of forwardRef in Photo component

This commit is contained in:
Caleb Denio 2024-07-12 12:03:01 -04:00
parent 1fbb7fb67b
commit 575a7369da
No known key found for this signature in database

View file

@ -17,17 +17,10 @@ const Caption = styled(Text)`
z-index: 0;
`
const Photo = React.forwardRef(function Photo({
src,
width,
height,
alt,
showAlt,
dark,
loading,
ref,
...props
}) {
const Photo = React.forwardRef(function Photo(
{ src, width, height, alt, showAlt, dark, loading, ...props },
ref
) {
const [colorMode] = useColorMode()
const showCaption = showAlt && alt
return (