diff --git a/admin-spa/src/App.tsx b/admin-spa/src/App.tsx index 9131128..fc932e2 100644 --- a/admin-spa/src/App.tsx +++ b/admin-spa/src/App.tsx @@ -57,7 +57,7 @@ function useFullscreen() { .wnw-fullscreen .woonoow-fullscreen-root { position: fixed; inset: 0; - z-index: 9999; + z-index: 999; background: var(--background, #fff); height: 100dvh; /* ensure full viewport height on mobile/desktop */ overflow: hidden; /* prevent double scrollbars; inner
handles scrolling */ diff --git a/admin-spa/src/components/ui/alert-dialog.tsx b/admin-spa/src/components/ui/alert-dialog.tsx index fa2b442..a6a26c0 100644 --- a/admin-spa/src/components/ui/alert-dialog.tsx +++ b/admin-spa/src/components/ui/alert-dialog.tsx @@ -16,7 +16,7 @@ const AlertDialogOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( (null); const [isModalOpen, setIsModalOpen] = useState(false); const [togglingGateway, setTogglingGateway] = useState(null); + const isDesktop = useMediaQuery("(min-width: 768px)"); // Fetch all payment gateways const { data: gateways = [], isLoading, refetch } = useQuery({ @@ -261,10 +264,10 @@ export default function PaymentsPage() { )} - {/* Gateway Settings Modal */} - {selectedGateway && ( + {/* Gateway Settings Modal - Responsive: Dialog on desktop, Drawer on mobile */} + {selectedGateway && isDesktop && ( - + {selectedGateway.title} Settings @@ -277,22 +280,20 @@ export default function PaymentsPage() { /> {/* Footer outside scrollable area */} -
+
-
)} + + {selectedGateway && !isDesktop && ( + + + + {selectedGateway.title} Settings + +
+ setIsModalOpen(false)} + hideFooter + /> +
+ {/* Footer outside scrollable area */} +
+ + + +
+ + + )} ); }