refactor special request & time estimate components

This commit is contained in:
2025-10-11 10:55:19 +03:00
parent cef2804ee6
commit 3ea54c0b3d
9 changed files with 69 additions and 86 deletions

View File

@@ -63,7 +63,7 @@ export function ProBottomSheet({
const deltaY = clientY - startPosRef.current;
sheetRef.current.style.transform = `translateY(${Math.max(0, deltaY)}px)`;
},
[isDragging]
[isDragging],
);
const endDrag = useCallback(
@@ -91,7 +91,7 @@ export function ProBottomSheet({
sheetRef.current.style.transform = "translateY(0)";
}
},
[isDragging, currentSnap, snapPoints.length, onClose]
[isDragging, currentSnap, snapPoints.length, onClose],
);
// Touch event handlers
@@ -99,21 +99,21 @@ export function ProBottomSheet({
(e: React.TouchEvent) => {
startDrag(e.touches[0].clientY);
},
[startDrag]
[startDrag],
);
const handleTouchMove = useCallback(
(e: React.TouchEvent) => {
handleDrag(e.touches[0].clientY);
},
[handleDrag]
[handleDrag],
);
const handleTouchEnd = useCallback(
(e: React.TouchEvent) => {
endDrag(e.changedTouches[0].clientY);
},
[endDrag]
[endDrag],
);
// Mouse event handlers
@@ -121,21 +121,21 @@ export function ProBottomSheet({
(e: React.MouseEvent) => {
startDrag(e.clientY);
},
[startDrag]
[startDrag],
);
const handleMouseMove = useCallback(
(e: MouseEvent) => {
handleDrag(e.clientY);
},
[handleDrag]
[handleDrag],
);
const handleMouseUp = useCallback(
(e: MouseEvent) => {
endDrag(e.clientY);
},
[endDrag]
[endDrag],
);
// Mouse event listeners
@@ -212,8 +212,6 @@ export function ProBottomSheet({
alignItems: "center",
justifyContent: "space-between",
minHeight: 60,
backgroundColor:
themeName === "dark" ? "rgba(42, 42, 42, 0.8)" : "transparent",
backdropFilter: themeName === "dark" ? "blur(8px)" : "none",
};