Fixed exit route on offers modal (#19126)

no issue

- when clicking outside the Edit or Add modal, it would clear the modal,
but not the route. This modifies the route to clear as well.
This commit is contained in:
Ronald Langeveld 2023-11-24 14:18:50 +02:00 committed by GitHub
parent 62b71fb4c0
commit d729e7aa21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -536,6 +536,9 @@ const AddOfferModal = () => {
href={href}
/>;
return <PreviewModalContent
afterClose={() => {
updateRoute('offers');
}}
cancelLabel='Cancel'
deviceSelector={false}
dirty={saveState === 'unsaved'}

View File

@ -259,6 +259,9 @@ const EditOfferModal: React.FC<{id: string}> = ({id}) => {
/>;
return offerById ? <PreviewModalContent
afterClose={() => {
updateRoute('offers');
}}
deviceSelector={false}
dirty={saveState === 'unsaved'}
height='full'