cart: apply form validation
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { Form } from "antd";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import useBreakPoint from "hooks/useBreakPoint.ts";
|
||||
import CartDesktopLayout from "pages/cart/components/CartDesktopLayout.tsx";
|
||||
import CartMobileTabletLayout from "pages/cart/components/CartMobileTabletLayout.tsx";
|
||||
import useBreakPoint from "hooks/useBreakPoint.ts";
|
||||
|
||||
export default function CartPage() {
|
||||
const { isDesktop } = useBreakPoint();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
// Prevent keyboard from appearing automatically on mobile
|
||||
useEffect(() => {
|
||||
// Blur any focused element when component mounts
|
||||
@@ -24,9 +27,17 @@ export default function CartPage() {
|
||||
|
||||
// Enhanced desktop layout
|
||||
if (isDesktop) {
|
||||
return <CartDesktopLayout />;
|
||||
return (
|
||||
<Form form={form}>
|
||||
<CartDesktopLayout form={form} />
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
// Mobile/Tablet Layout (existing code)
|
||||
return <CartMobileTabletLayout />;
|
||||
return (
|
||||
<Form form={form}>
|
||||
<CartMobileTabletLayout form={form} />
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user