From 575a7369dacfac77747483a65d3b9c3e05151b07 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Fri, 12 Jul 2024 12:03:01 -0400 Subject: [PATCH] Fix use of `forwardRef` in `Photo` component --- components/photo.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/components/photo.js b/components/photo.js index 04215ea4..2e7ec5ac 100644 --- a/components/photo.js +++ b/components/photo.js @@ -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 (