diff --git a/modules/foundups/gotjunk/frontend/components/InstructionsModal.tsx b/modules/foundups/gotjunk/frontend/components/InstructionsModal.tsx index ee53a4b4..102a74af 100644 --- a/modules/foundups/gotjunk/frontend/components/InstructionsModal.tsx +++ b/modules/foundups/gotjunk/frontend/components/InstructionsModal.tsx @@ -16,6 +16,10 @@ interface InstructionsModalProps { } export const InstructionsModal: React.FC = ({ isOpen, onClose }) => { + const topOffset = 'calc(env(safe-area-inset-top, 20px) + 16px)'; + const maxHeightDvh = 'min(420px, calc(100dvh - env(safe-area-inset-top, 20px) - 220px))'; + const maxHeightFallback = 'min(420px, calc(100vh - env(safe-area-inset-top, 20px) - 220px))'; + return ( {isOpen && ( @@ -23,54 +27,63 @@ export const InstructionsModal: React.FC = ({ isOpen, on initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -20 }} - className="fixed left-1/2 -translate-x-1/2 w-[min(92vw,360px)]" + className="fixed w-[min(92vw,360px)] px-1" style={{ - top: 'calc(env(safe-area-inset-top, 20px) + 16px)', - zIndex: Z_LAYERS.tutorialPopup + left: '50%', + transform: 'translateX(calc(-50% - 50px))', + top: topOffset, + zIndex: Z_LAYERS.tutorialPopup, + maxHeight: maxHeightDvh, + overflowY: 'auto' }} role="dialog" aria-modal="true" + onClick={onClose} > -
+
e.stopPropagation()} + > {/* Header */} -

+

GotJunk?!

-

+

Browse items near you

{/* Instructions */} -
-
-
+
+
+
-
-

Swipe Left

+
+

Swipe Left

Skip

-
-
+
+
-
-

Swipe Right

+
+

Swipe Right

Add to Cart

-

+

50km radius • Tinder for stuff