chore: cleaning up select-rate

This commit is contained in:
Simon Emanuelsson
2025-02-05 20:18:03 +01:00
parent 3044bc87d1
commit 051bc54e6c
95 changed files with 3269 additions and 3527 deletions

View File

@@ -42,8 +42,8 @@ import { type PaymentFormData, paymentSchema } from "./schema"
import styles from "./payment.module.css"
import type { PaymentClientProps } from "@/types/components/hotelReservation/enterDetails/payment"
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import type { PaymentClientProps } from "@/types/components/hotelReservation/selectRate/section"
const maxRetries = 15
const retryInterval = 2000

View File

@@ -2,7 +2,7 @@ import { getSavedPaymentCardsSafely } from "@/lib/trpc/memoizedRequests"
import PaymentClient from "./PaymentClient"
import type { PaymentProps } from "@/types/components/hotelReservation/selectRate/section"
import type { PaymentProps } from "@/types/components/hotelReservation/enterDetails/payment"
export default async function Payment({
user,

View File

@@ -11,7 +11,7 @@ import type { SummaryProps } from "@/types/components/hotelReservation/summary"
export default function DesktopSummary(props: SummaryProps) {
const {
booking,
actions: { toggleSummaryOpen, togglePriceDetailsModalOpen },
actions: { toggleSummaryOpen },
totalPrice,
vat,
} = useEnterDetailsStore((state) => state)
@@ -28,7 +28,6 @@ export default function DesktopSummary(props: SummaryProps) {
totalPrice={totalPrice}
vat={vat}
toggleSummaryOpen={toggleSummaryOpen}
togglePriceDetailsModalOpen={togglePriceDetailsModalOpen}
/>
</SidePanel>
)

View File

@@ -14,7 +14,7 @@ import type { SummaryProps } from "@/types/components/hotelReservation/summary"
export default function MobileSummary(props: SummaryProps) {
const {
booking,
actions: { toggleSummaryOpen, togglePriceDetailsModalOpen },
actions: { toggleSummaryOpen },
totalPrice,
vat,
} = useEnterDetailsStore((state) => state)
@@ -40,7 +40,6 @@ export default function MobileSummary(props: SummaryProps) {
totalPrice={totalPrice}
vat={vat}
toggleSummaryOpen={toggleSummaryOpen}
togglePriceDetailsModalOpen={togglePriceDetailsModalOpen}
/>
</div>
</SummaryBottomSheet>

View File

@@ -35,7 +35,6 @@ export default function SummaryUI({
breakfastIncluded,
vat,
toggleSummaryOpen,
togglePriceDetailsModalOpen,
}: EnterDetailsSummaryProps) {
const intl = useIntl()
const lang = useLang()
@@ -53,12 +52,6 @@ export default function SummaryUI({
}
}
function handleTogglePriceDetailsModal() {
if (togglePriceDetailsModalOpen) {
togglePriceDetailsModalOpen()
}
}
function getMemberPrice(roomRate: RoomRate) {
return roomRate?.memberRate
? {
@@ -369,7 +362,6 @@ export default function SummaryUI({
}))}
totalPrice={totalPrice}
vat={vat}
toggleModal={handleTogglePriceDetailsModal}
/>
</div>
<div>

View File

@@ -102,7 +102,6 @@ describe("EnterDetails Summary", () => {
}}
vat={12}
toggleSummaryOpen={jest.fn()}
togglePriceDetailsModalOpen={jest.fn()}
/>,
{
wrapper: createWrapper(intl),
@@ -141,7 +140,6 @@ describe("EnterDetails Summary", () => {
}}
vat={12}
toggleSummaryOpen={jest.fn()}
togglePriceDetailsModalOpen={jest.fn()}
/>,
{
wrapper: createWrapper(intl),