diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx index 12bb347ca4..2efbaad5b3 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx @@ -34,6 +34,8 @@ const Sidebar: React.FC<{ const [nameLength, setNameLength] = useState(offer?.name.length || 0); const nameLengthColor = nameLength > 40 ? 'text-red' : 'text-green'; + const {updateRoute} = useRouting(); + useEffect(() => { if (offer?.name) { setNameLength(offer?.name.length); @@ -66,6 +68,7 @@ const Sidebar: React.FC<{ type: 'success', message: 'Offer archived successfully' }); + updateRoute('offers/edit'); } catch (e) { handleError(e); } @@ -86,6 +89,7 @@ const Sidebar: React.FC<{ type: 'success', message: 'Offer reactivated successfully' }); + updateRoute('offers/edit'); } catch (e) { handleError(e); }