Skip to content

Commit 24dc227

Browse files
committed
Fixed Merge Conflicts
Signed-off-by: SplinterSword <[email protected]>
1 parent 9e9f0df commit 24dc227

File tree

1 file changed

+15
-0
lines changed
  • site/src/components/ShapeBuilder

1 file changed

+15
-0
lines changed

site/src/components/ShapeBuilder/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ const ShapeBuilder = () => {
2121
const [dragState, setDragState] = useState(null);
2222
const [result, setResult] = useState("");
2323

24+
const [error, setError] = useState(null);
25+
const [showCopied, setShowCopied] = useState(false);
26+
27+
const handleCopyToClipboard = async () => {
28+
if (!result.trim()) return;
29+
30+
try {
31+
await navigator.clipboard.writeText(result);
32+
setShowCopied(true);
33+
setTimeout(() => setShowCopied(false), 2000);
34+
} catch (err) {
35+
console.error("Failed to copy to clipboard:", err);
36+
}
37+
};
38+
2439
// deep clone anchors helper
2540
const cloneAnchors = (arr) => arr.map(a => ({
2641
x: a.x, y: a.y,

0 commit comments

Comments
 (0)