Skip to content

Commit

Permalink
Merge pull request #426 from Giphy/fix/ssr-hyrdation-warning-in-style…
Browse files Browse the repository at this point in the history
…d-components

ssr: fix styled components hydration warning
  • Loading branch information
giannif authored Dec 11, 2023
2 parents 4e43654 + 30ccd9f commit d581071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-monkeys-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@giphy/react-components': patch
---

fix ssr hydration warning in styled component
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ const SearchButton = ({ onClick }: Props) => {
const throttledFetch = useThrottle(isFetching, 1000)
return (
<Container onClick={() => onClick?.()}>
<GradientBox />
<GradientBox suppressHydrationWarning />
<SearchIcon />
{throttledFetch && (
<Fx>
<Scanner />
<Fx suppressHydrationWarning>
<Scanner suppressHydrationWarning />
</Fx>
)}
</Container>
Expand Down

0 comments on commit d581071

Please sign in to comment.