Merged in feat/SW-454-select-room-api (pull request #648)
Feat/SW-454 Create select rate page foundation * Extract select-rate page to its own, fixed route * Rename availability to hotelsAvailability * Update availability hotels response * Number to string Approved-by: Pontus Dreij
This commit is contained in:
@@ -5,11 +5,10 @@ import RoomCard from "./RoomCard"
|
||||
|
||||
import styles from "./roomSelection.module.css"
|
||||
|
||||
import { RoomSelectionProps } from "@/types/components/hotelReservation/selectRate/section"
|
||||
import { RoomSelectionProps } from "@/types/components/hotelReservation/selectRate/roomSelection"
|
||||
|
||||
export default function RoomSelection({
|
||||
alternatives,
|
||||
nextPath,
|
||||
rates,
|
||||
nrOfNights,
|
||||
nrOfAdults,
|
||||
}: RoomSelectionProps) {
|
||||
@@ -21,17 +20,17 @@ export default function RoomSelection({
|
||||
const queryParams = new URLSearchParams(searchParams)
|
||||
queryParams.set("roomClass", e.currentTarget.roomClass?.value)
|
||||
queryParams.set("flexibility", e.currentTarget.flexibility?.value)
|
||||
router.push(`${nextPath}?${queryParams}`)
|
||||
router.push(`select-bed?${queryParams}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<ul className={styles.roomList}>
|
||||
{alternatives.map((room) => (
|
||||
{rates.map((room) => (
|
||||
<li key={room.id}>
|
||||
<form
|
||||
method="GET"
|
||||
action={`${nextPath}?${searchParams}`}
|
||||
action={`select-bed?${searchParams}`}
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
<input
|
||||
@@ -50,6 +49,7 @@ export default function RoomSelection({
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<div className={styles.summary}>This is summary</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,3 +21,10 @@
|
||||
position: fixed;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.summary {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user