Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

removed <></>

Steven Tey3d26f2f8cace
diff --git a/components/shared/modal.tsx b/components/shared/modal.tsx
index 31b7ccfb3d..d78881cc23 100644
--- a/components/shared/modal.tsx
+++ b/components/shared/modal.tsx
@@ -68,55 +68,53 @@ export default function Modal({
return (
<AnimatePresence>
{showModal && (
- <>
- <FocusTrap>
- <div className="absolute">
- <motion.div
- ref={mobileModalRef}
- key="mobile-modal"
- className="group fixed bottom-0 inset-x-0 z-40 w-screen sm:hidden cursor-grab active:cursor-grabbing"
- initial={{ y: "100%" }}
- animate={controls}
- exit={{ y: "100%" }}
- transition={transitionProps}
- drag="y"
- dragDirectionLock
- onDragEnd={handleDragEnd}
- dragElastic={{ top: 0, bottom: 1 }}
- dragConstraints={{ top: 0, bottom: 0 }}
+ <FocusTrap>
+ <div className="absolute">
+ <motion.div
+ ref={mobileModalRef}
+ key="mobile-modal"
+ className="group fixed bottom-0 inset-x-0 z-40 w-screen sm:hidden cursor-grab active:cursor-grabbing"
+ initial={{ y: "100%" }}
+ animate={controls}
+ exit={{ y: "100%" }}
+ transition={transitionProps}
+ drag="y"
+ dragDirectionLock
+ onDragEnd={handleDragEnd}
+ dragElastic={{ top: 0, bottom: 1 }}
+ dragConstraints={{ top: 0, bottom: 0 }}
+ >
+ <div
+ className={`h-7 ${bgColor} w-full flex items-center justify-center rounded-t-4xl border-t border-gray-200 -mb-1`}
>
- <div
- className={`h-7 ${bgColor} w-full flex items-center justify-center rounded-t-4xl border-t border-gray-200 -mb-1`}
- >
- <div className="rounded-full h-1 w-6 -mr-1 bg-gray-300 group-active:rotate-12 transition-all" />
- <div className="rounded-full h-1 w-6 bg-gray-300 group-active:-rotate-12 transition-all" />
- </div>
- {children}
- </motion.div>
- <motion.div
- ref={desktopModalRef}
- key="desktop-modal"
- className="fixed inset-0 z-40 min-h-screen hidden sm:flex items-center justify-center"
- initial={{ scale: 0.95 }}
- animate={{ scale: 1 }}
- exit={{ scale: 0.95 }}
- onClick={(e) => {
- if (desktopModalRef.current === e.target) closeModal();
- }}
- >
- {children}
- </motion.div>
- <motion.div
- key="backdrop"
- className="fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur"
- initial={{ opacity: 0 }}
- animate={{ opacity: 1 }}
- exit={{ opacity: 0 }}
- onClick={closeModal}
- />
- </div>
- </FocusTrap>
- </>
+ <div className="rounded-full h-1 w-6 -mr-1 bg-gray-300 group-active:rotate-12 transition-all" />
+ <div className="rounded-full h-1 w-6 bg-gray-300 group-active:-rotate-12 transition-all" />
+ </div>
+ {children}
+ </motion.div>
+ <motion.div
+ ref={desktopModalRef}
+ key="desktop-modal"
+ className="fixed inset-0 z-40 min-h-screen hidden sm:flex items-center justify-center"
+ initial={{ scale: 0.95 }}
+ animate={{ scale: 1 }}
+ exit={{ scale: 0.95 }}
+ onClick={(e) => {
+ if (desktopModalRef.current === e.target) closeModal();
+ }}
+ >
+ {children}
+ </motion.div>
+ <motion.div
+ key="backdrop"
+ className="fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ onClick={closeModal}
+ />
+ </div>
+ </FocusTrap>
)}
</AnimatePresence>
);