Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const MobileModal = ({ tickets, open, setOpen }) => {
const [size, setSize] = useState("100%")
const pathPos = useSpring(0, { springConfig })
const path = useTransform(pathPos, value =>
interpolator(transform(value, [0, 1], [0, 1]))
)
useEffect(() => {
const timer = setTimeout(
() => {
pathPos.set(open ? 1 : 0)
},
open ? 400 : 500
)
return () => clearTimeout(timer)
}, [open, pathPos])
useEffect(() => {
const getSize = debounce(() => {