@@ -163,7 +178,12 @@ export function BookStickerInstruction({ code, coverUrl, className }: BookSticke
animate={{
rotateY: isOpen ? -180 : 0,
}}
- transition={{ duration: 1.5, type: "spring", stiffness: 40, damping: 12 }}
+ transition={{
+ duration: ANIMATION_CONFIG.duration,
+ type: "spring",
+ stiffness: 40,
+ damping: 12,
+ }}
onUpdate={(latest) => {
// Track rotation to toggle visibility state at 90 degrees (halfway)
if (typeof latest.rotateY === "number") {
@@ -184,7 +204,13 @@ export function BookStickerInstruction({ code, coverUrl, className }: BookSticke

{
+ const img = e.currentTarget
+ if (img.naturalWidth && img.naturalHeight) {
+ setDynamicAspectRatio(img.naturalWidth / img.naturalHeight)
+ }
+ }}
/>
) : (
@@ -221,7 +247,7 @@ export function BookStickerInstruction({ code, coverUrl, className }: BookSticke
@@ -234,7 +260,9 @@ export function BookStickerInstruction({ code, coverUrl, className }: BookSticke