From 428556919f8fbea84f113aec71efc4d076c85a93 Mon Sep 17 00:00:00 2001 From: katamaz Date: Fri, 28 Aug 2026 17:40:17 +0300 Subject: [PATCH] fix: datepicker animation note: https://github.com/motiondivision/motion/issues/2416 --- src/trash/trash-components.jsx | 107 +++++++++++---------------------- 1 file changed, 35 insertions(+), 72 deletions(-) diff --git a/src/trash/trash-components.jsx b/src/trash/trash-components.jsx index 193ccc1..5338442 100644 --- a/src/trash/trash-components.jsx +++ b/src/trash/trash-components.jsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import { useEffect, useId, useState } from "react"; import { BiCheck, BiHide, @@ -123,34 +123,36 @@ function DatePickerButton({ next = false, date, setDate, pink = false }) { export const DatePicker = (props) => { const dateTag = getDateTags(props.date); const { trigger } = useWebHaptics(); + const layoutGroupId = useId(); + return ( - -
- - +
+ + + { if (apiFormatDate(props.date) != apiFormatDate(new Date())) trigger([ @@ -171,7 +173,7 @@ export const DatePicker = (props) => { : " bg-transparent") } layoutId="datepicker_indicator" - // layout="position" + layout="position" /> { <> { )} - -
- + + +
); }; @@ -255,45 +257,6 @@ export function DengiButton({ ); } -// BAD IDEA:: -// -// export function CoolMouseBg() { -// const x = useSpring(0, { stiffness: 200, damping: 40 }); -// const y = useSpring(0, { stiffness: 200, damping: 40 }); - -// const [visible, setVisible] = useState(false); - -// useEffect(() => { -// const move = (e) => { -// if (visible) { -// x.set(e.clientX - 25); -// y.set(e.clientY - 25); -// } else { -// setVisible(true); -// } -// }; -// window.addEventListener("mousemove", move); -// return () => { -// window.removeEventListener("mousemove", move); -// }; -// }, [visible]); - -// return ( -//
-// -//
-// ); -// } - const defaultDialogContent = { message: "?", yesBtn: "da",