Merged in fix/SW-2648-remove-ancillary-update-price (pull request #2002)
fix(SW-2648): refresh mystay after removing ancillary * fix(SW-2648): refresh mystay after removing ancillary Approved-by: Niclas Edenvin
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
@@ -8,7 +7,6 @@ import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import { trackRemoveAncillary } from "@/utils/tracking/myStay"
|
||||
|
||||
import { getBreakfastPackagesFromAncillaryFlow } from "../../utils/hasBreakfastPackage"
|
||||
import RemoveButton from "./RemoveButton"
|
||||
@@ -27,7 +25,6 @@ export function AddedAncillaries({
|
||||
booking,
|
||||
}: AddedAncillariesProps) {
|
||||
const intl = useIntl()
|
||||
const router = useRouter()
|
||||
|
||||
const addedBreakfastPackages = getBreakfastPackagesFromAncillaryFlow(
|
||||
booking.packages
|
||||
@@ -134,7 +131,8 @@ export function AddedAncillaries({
|
||||
: [ancillary.code]
|
||||
}
|
||||
title={ancillaryTitle}
|
||||
onSuccess={router.refresh}
|
||||
booking={booking}
|
||||
ancillary={ancillary}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -200,14 +198,8 @@ export function AddedAncillaries({
|
||||
: [ancillary.code]
|
||||
}
|
||||
title={ancillaryTitle}
|
||||
onSuccess={() => {
|
||||
trackRemoveAncillary(
|
||||
ancillary,
|
||||
booking.hotelId,
|
||||
booking.ancillary?.deliveryTime
|
||||
)
|
||||
router.refresh()
|
||||
}}
|
||||
booking={booking}
|
||||
ancillary={ancillary}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user