0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Add offer cancle button fix (#19297)

Fixes PROD-213
This commit is contained in:
Princi Vershwal 2023-12-11 10:10:35 +05:30 committed by GitHub
parent 2caf1ec93a
commit 5cb3ec6e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -592,7 +592,7 @@ const AddOfferModal = () => {
}, [hasOffers, modal, updateRoute]);
const cancelAddOffer = () => {
updateRoute('offers/edit');
window.history.back();
};
const overrides : offerPortalPreviewUrlTypes = useMemo(() => {

View file

@ -268,7 +268,7 @@ const EditOfferModal: React.FC<{id: string}> = ({id}) => {
title='Offer'
width={1140}
onCancel={() => {
updateRoute('offers/edit');
window.history.back();
}}
onOk={async () => {
if (!(await handleSave({fakeWhenUnchanged: true}))) {

View file

@ -18,7 +18,7 @@ const OffersRouteHandler: React.FC<OffersRouteHandlerProps> = ({route}) => {
} else if (route.startsWith('offers/success/') && route.length > 'offers/success/'.length) {
const offerId = route.split('/').pop();
return <OfferSuccess id={offerId ? offerId : ''} />;
} else {
} else if (route === 'offers/edit') {
return <OffersIndexModal />;
}
};