Revert "Add offer cancle button fix" (#19324)

Reverts TryGhost/Ghost#19297
This commit is contained in:
Princi Vershwal 2023-12-12 12:57:17 +05:30 committed by GitHub
parent c932e9d60e
commit c1c3775748
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 = () => {
window.history.back();
updateRoute('offers/edit');
};
const overrides : offerPortalPreviewUrlTypes = useMemo(() => {

View File

@ -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}))) {

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 if (route === 'offers/edit') {
} else {
return <OffersIndexModal />;
}
};