kasuti: shared replay URL lands on empty board, no confetti
Hydration now pre-arms celebratedRef so the completion effect skips both the confetti and the replayIdx=stitches.length snap. The viewer lands on an empty fabric with the full tour queued up and drives playback from the replay controls — no spoiler, and no party popper on someone else's accomplishment. https://claude.ai/code/session_01KNdXjQczMCRGMK7K3Qderw
This commit is contained in:
parent
0378978b1f
commit
39d173ab75
1 changed files with 4 additions and 0 deletions
|
|
@ -1095,6 +1095,10 @@ const KasutiEmbroidery: React.FC = () => {
|
||||||
setCurrentVertex(from);
|
setCurrentVertex(from);
|
||||||
setActiveSide(rebuilt.length % 2 === 0 ? 'front' : 'back');
|
setActiveSide(rebuilt.length % 2 === 0 ? 'front' : 'back');
|
||||||
setStitches(rebuilt);
|
setStitches(rebuilt);
|
||||||
|
// Pre-arm the celebration flag so the completion effect leaves replayIdx
|
||||||
|
// at 0 and doesn't fire confetti — URL arrivals should land on an empty
|
||||||
|
// board and press play themselves to watch the tour get stitched in.
|
||||||
|
celebratedRef.current = true;
|
||||||
setCompleted(true);
|
setCompleted(true);
|
||||||
hydratedRef.current = true;
|
hydratedRef.current = true;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue