Skip to content

An opinionated toast component for React.

docs: Fix copy button in CodeBlock (#180)

Maciej Piotr Balcerzak4e011dab9548
diff --git a/website/src/components/CodeBlock/index.tsx b/website/src/components/CodeBlock/index.tsx
index 63d08eb..c55b580 100644
--- a/website/src/components/CodeBlock/index.tsx
+++ b/website/src/components/CodeBlock/index.tsx
@@ -55,7 +55,7 @@ export const CodeBlock = ({ children, initialHeight = 0 }: { children: string; i
setTimeout(() => {
setCopying((c) => c - 1);
}, 2000);
- }, []);
+ }, [children]);
return (
<div className={styles.outerWrapper}>