Skip to content
This repository was archived by the owner on Jul 26, 2025. It is now read-only.

Commit a92f1ba

Browse files
committed
fixup demo
1 parent 156fa0f commit a92f1ba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

demo/components/Home.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default function Home() {
1515
const snapshotImageRef = useRef<Image>(null);
1616
const canvasInputRef = useRef<HTMLCanvasElement>(null);
1717
const [snapshotUrl, setSnapshotUrl] = useState('');
18-
console.log(snapshotUrl);
1918
return (
2019
<Container title="Home">
2120
<div className="space-y-1">

demo/components/SnapshotImage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ interface SnapshotImageProps {
44

55
export default function SnapshotImage(props: SnapshotImageProps) {
66
const { snapshotUrl: snapshot } = props;
7-
return <img style={{ transform: 'scaleX(-1)' }} src={snapshot} />;
7+
return snapshot ? (
8+
<img alt="snapshot" style={{ transform: 'scaleX(-1)' }} src={snapshot} />
9+
) : null;
810
}

0 commit comments

Comments
 (0)