keep tilts synced

This commit is contained in:
Gavin McDonald
2025-07-01 14:35:32 -04:00
parent 6b3ab9a54e
commit f61ca0d0a1
4 changed files with 29 additions and 21 deletions

View File

@@ -45,6 +45,10 @@ export function AppProvider({ children }: { children: ReactNode }) {
if (tilt[cardIndex]) {
emitTilt(cardIndex, tilt[cardIndex]);
} else {
// cardIndex does not matter
// all tilts for this user will be cleared
emitTilt(0, { rotateX: 0, rotateY: 0 });
}
}, [tilt]);