diff --git a/components/modal.js b/components/modal.js index 183b762e..dc54d411 100644 --- a/components/modal.js +++ b/components/modal.js @@ -21,6 +21,7 @@ export function useShowModal () { export default function useModal () { const [modalContent, setModalContent] = useState(null) + const [modalOptions, setModalOptions] = useState(null) const onClose = useCallback(() => { setModalContent(null) @@ -31,7 +32,7 @@ export default function useModal () { return null } return ( - +
X
{modalContent} @@ -41,7 +42,8 @@ export default function useModal () { }, [modalContent, onClose]) const showModal = useCallback( - (getContent) => { + (getContent, options) => { + setModalOptions(options) setModalContent(getContent(onClose)) }, [onClose] diff --git a/lib/anonymous.js b/lib/anonymous.js index 663a1c37..559854a1 100644 --- a/lib/anonymous.js +++ b/lib/anonymous.js @@ -58,7 +58,7 @@ export const useAnonymous = (fn, options = defaultOptions) => { }, 2000) } } successVerb='received' - /> + />, { keepOpen: true } ) } }, [invoice?.id])