You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
463 B

export const shouldOpenModal = (props, prevProps) => {
if (!props.modal) return false
if (!props.open) return false
const currentlyOpen = prevProps?.open
if (currentlyOpen) return false
return true
}
export const shouldCloseModal = (props, prevProps, isClosing) => {
if (!props.modal) return false
if (props.open) return false
const currentlyOpen = prevProps?.open
if (!currentlyOpen) return false
if (isClosing) return false
return true
}