Merged in fix/booking-flow-eslint-fix (pull request #3342)
fix: Upgrade booking-flow eslint config * Upgrade booking-flow eslint config Approved-by: Bianca Widstam
This commit is contained in:
@@ -30,6 +30,7 @@ export default function MemberPriceModal() {
|
||||
|
||||
useEffect(() => {
|
||||
if (join) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setIsOpen(true)
|
||||
}
|
||||
}, [join])
|
||||
|
||||
@@ -49,6 +49,7 @@ export default function Signup({
|
||||
<div className={styles.additionalFormData}>
|
||||
<div
|
||||
ref={(el) => {
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
refs.current.zipCode = el
|
||||
}}
|
||||
>
|
||||
@@ -64,6 +65,7 @@ export default function Signup({
|
||||
<div
|
||||
className={styles.dateField}
|
||||
ref={(el) => {
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
refs.current.dateOfBirth = el
|
||||
}}
|
||||
>
|
||||
@@ -110,6 +112,7 @@ export default function Signup({
|
||||
return (
|
||||
<div
|
||||
ref={(el) => {
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
refs.current.membershipNo = el
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -40,6 +40,7 @@ function useBookingErrorAlert() {
|
||||
const selectRateReturnUrl = getSelectRateReturnUrl()
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setShowAlert(!!errorCode)
|
||||
}, [errorCode])
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ export default function PaymentClient({
|
||||
if (booking.reservationStatus == BookingStatusEnum.BookingCompleted) {
|
||||
clearBookingWidgetState()
|
||||
// Cookie is used by Booking Confirmation page to validate that the user came from payment callback
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
document.cookie = `bcsig=${result.sig}; Path=/; Max-Age=60; Secure; SameSite=Strict`
|
||||
const confirmationUrl = `${bookingConfirmation(lang)}?RefId=${encodeURIComponent(mainRoom.refId)}`
|
||||
router.push(confirmationUrl)
|
||||
|
||||
@@ -44,6 +44,7 @@ export default function Section({
|
||||
|
||||
useEffect(() => {
|
||||
if (step === EnterDetailsStepEnum.selectBed && bedType) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTitle(bedType.description)
|
||||
}
|
||||
// If breakfast step, check if an option has been selected
|
||||
|
||||
@@ -66,6 +66,7 @@ export function MapContainer({ children }: { children: React.ReactNode }) {
|
||||
|
||||
if (scrollHeightWhenOpened === 0) {
|
||||
const scrollY = window.scrollY
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setScrollHeightWhenOpened(scrollY)
|
||||
window.scrollTo({ top: 0, behavior: "instant" })
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ export default function FilterAndSortModal({
|
||||
|
||||
useEffect(() => {
|
||||
if (activeFilters.length) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setSelectedFilters(activeFilters)
|
||||
}
|
||||
}, [activeFilters])
|
||||
|
||||
@@ -64,6 +64,7 @@ export default function FilterContent({
|
||||
selectedFilters[0] || []
|
||||
)
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setFilteredHotelIds(filteredIds)
|
||||
}, [filters, activeFilters, setFilteredHotelIds, showOnlyBookingCodeRates])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user