@codesinger0/shared-components 1.1.39 → 1.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,11 +84,14 @@ const OrderForm = ({
84
84
  const [isSubmitting, setIsSubmitting] = useState(false);
85
85
  const [errors, setErrors] = useState({});
86
86
 
87
+ const localScrollContainerRef = useRef(null);
88
+ const activeScrollContainerRef = scrollContainerRef || localScrollContainerRef;
89
+
87
90
  const scrollToAnchor = (fieldName) => {
88
91
  // Small delay to ensure error messages are rendered
89
92
  setTimeout(() => {
90
93
  const element = document.getElementById(`${fieldName}`);
91
- const container = scrollContainerRef.current;
94
+ const container = activeScrollContainerRef.current;
92
95
 
93
96
  if (element && container) {
94
97
  // Get element position relative to container
@@ -498,7 +501,11 @@ const OrderForm = ({
498
501
  const grandTotal = discountedSubtotal + deliveryCost;
499
502
 
500
503
  return (
501
- <div className="min-h-screen bg-main py-12 px-4" dir="rtl">
504
+ <div
505
+ ref={scrollContainerRef ? null : localScrollContainerRef}
506
+ className={scrollContainerRef ? "min-h-screen bg-main py-12 px-4" : "h-screen overflow-y-auto bg-main py-12 px-4"}
507
+ dir="rtl"
508
+ >
502
509
  <div className="max-w-2xl mx-auto">
503
510
 
504
511
  {/* Back Button */}
@@ -672,7 +679,7 @@ const OrderForm = ({
672
679
  </div>)}
673
680
 
674
681
  {/* Address */}
675
- {(formData.deliveryMethod === 'delivery' || isCoursePurchase || isWorkshopPurchase) && (
682
+ {(formData.deliveryMethod === 'delivery' && !(isCoursePurchase || isWorkshopPurchase)) && (
676
683
  <div className="space-y-4 border-t border-gray-200 pt-6">
677
684
  <h2 className="subtitle font-semibold">כתובת</h2>
678
685
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [