Revert "Add offer cancle button fix" (#19324)
Reverts TryGhost/Ghost#19297
This commit is contained in:
parent
c932e9d60e
commit
c1c3775748
@ -592,7 +592,7 @@ const AddOfferModal = () => {
|
||||
}, [hasOffers, modal, updateRoute]);
|
||||
|
||||
const cancelAddOffer = () => {
|
||||
window.history.back();
|
||||
updateRoute('offers/edit');
|
||||
};
|
||||
|
||||
const overrides : offerPortalPreviewUrlTypes = useMemo(() => {
|
||||
|
@ -268,7 +268,7 @@ const EditOfferModal: React.FC<{id: string}> = ({id}) => {
|
||||
title='Offer'
|
||||
width={1140}
|
||||
onCancel={() => {
|
||||
window.history.back();
|
||||
updateRoute('offers/edit');
|
||||
}}
|
||||
onOk={async () => {
|
||||
if (!(await handleSave({fakeWhenUnchanged: true}))) {
|
||||
|
@ -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 if (route === 'offers/edit') {
|
||||
} else {
|
||||
return <OffersIndexModal />;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user