Merged in chore/upgrade-to-next16 (pull request #3305)
chore(SW-3665): Upgrade to Next 16 * Upgrade partner-sas * Upgrade scandic-web to next 16 * Update peerDep versions * Fix revalidateTag * Remove comment * Merge branch 'master' into chore/upgrade-to-next16 * Update netlify adapter * Build with webpack instead of turbopack * Revert from proxy to middleware * Merge branch 'master' into chore/upgrade-to-next16 * Revert proxy type * Fix react types versions * 16.0.9 * Bump to 16.0.10 Approved-by: Linus Flood
This commit is contained in:
@@ -157,7 +157,9 @@ export default function OverviewTableClient({
|
||||
<div>
|
||||
<div className={styles.mobileColumns}>
|
||||
<div className={styles.columnHeaderContainer}>
|
||||
{/* eslint-disable-next-line react-hooks/static-components */}
|
||||
<MobileColumnHeader column="A" />
|
||||
{/* eslint-disable-next-line react-hooks/static-components */}
|
||||
<MobileColumnHeader column="B" />
|
||||
</div>
|
||||
<RewardList
|
||||
|
||||
@@ -23,6 +23,7 @@ export function RewardIcon({
|
||||
if (!IconComponent) return null
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react-hooks/static-components
|
||||
<IconComponent
|
||||
{...props}
|
||||
width={sizeMap[iconSize].width}
|
||||
|
||||
@@ -69,6 +69,7 @@ function Carousel({
|
||||
|
||||
useEffect(() => {
|
||||
if (!api) return
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
onSelect(api)
|
||||
api.on("reInit", onSelect)
|
||||
api.on("select", onSelect)
|
||||
|
||||
@@ -59,6 +59,7 @@ export default function HotelList() {
|
||||
return
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setVisibleHotels(getVisibleHotels(activeHotels, map))
|
||||
}, [map, activeHotels])
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function CityMap({
|
||||
|
||||
useEffect(() => {
|
||||
const url = new URL(window.location.href)
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setIsFromCountryPage(url.searchParams.has("fromCountry"))
|
||||
}, [params])
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ export default function DynamicMap({
|
||||
bounds.extend(marker.coordinates)
|
||||
})
|
||||
map.fitBounds(bounds, boundsPadding)
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setHasFittedBounds(true)
|
||||
}
|
||||
}, [map, fitBounds, markers, hasFittedBounds, boundsPadding])
|
||||
|
||||
@@ -86,6 +86,7 @@ export default function Map({
|
||||
|
||||
useEffect(() => {
|
||||
const url = new URL(window.location.href)
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setFromCountryPage(url.searchParams.has("fromCountry"))
|
||||
}, [params])
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ export default function TabNavigation({
|
||||
url.hash = activeSectionId
|
||||
window.history.replaceState(null, "", url.toString())
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setActiveHash(activeSectionId)
|
||||
}
|
||||
}, [activeSectionId])
|
||||
|
||||
@@ -70,6 +70,7 @@ export default function ActivateOffer({
|
||||
(activateCampaign.isSuccess && activateCampaign.data) ? (
|
||||
<CampaignActivated />
|
||||
) : (
|
||||
// eslint-disable-next-line react-hooks/static-components
|
||||
<ActivateButton />
|
||||
)}
|
||||
<ErrorModal
|
||||
|
||||
@@ -115,6 +115,7 @@ export default function PromoCampaignHero({
|
||||
</ul>
|
||||
) : null}
|
||||
</div>
|
||||
{/* eslint-disable-next-line react-hooks/static-components */}
|
||||
<CampaignCTA />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -22,14 +22,15 @@ export function FilterAndSortButton({
|
||||
|
||||
const searchParams = useSearchParams()
|
||||
const [isMapView, setIsMapView] = useState(false)
|
||||
const [isHydrated, setIsHydrated] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const isMapView = searchParams.get("view") === "map"
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setIsMapView(isMapView)
|
||||
setIsHydrated(true)
|
||||
}, [searchParams])
|
||||
|
||||
const [isHydrated, setIsHydrated] = useState(false)
|
||||
const isDesktop = useMediaQuery("(min-width: 950px)")
|
||||
if (!isHydrated) return null
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ export default function Form({ user }: EditFormProps) {
|
||||
utils.user.get.invalidate()
|
||||
if (isPasswordChanged) {
|
||||
// Kept logout out of Next router forcing browser to navigate on logout url
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
window.location.href = logout[lang]
|
||||
} else {
|
||||
const myStayReturnRoute = sessionStorage.getItem("myStayReturnRoute")
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function AdditionalInfoForm({
|
||||
confirmationNumber,
|
||||
lastName,
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
document.cookie = `bv=${JSON.stringify(value)}; Path=/; Max-Age=600; Secure; SameSite=Strict`
|
||||
router.refresh()
|
||||
}
|
||||
|
||||
@@ -270,6 +270,7 @@ export default function AddAncillaryFlowModal({
|
||||
formMethods.reset(updatedFormData)
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setErrorMessage(getErrorMessage(intl, errorCode))
|
||||
queryParams.delete("ancillary")
|
||||
queryParams.delete("errorCode")
|
||||
|
||||
@@ -57,6 +57,7 @@ export default function GuaranteePaymentFailed() {
|
||||
? AlertTypeEnum.Warning
|
||||
: AlertTypeEnum.Alarm
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setAlert({ type, message })
|
||||
|
||||
const newParams = new URLSearchParams(searchParams.toString())
|
||||
|
||||
@@ -45,6 +45,7 @@ function usePromptInitialization(memberKey: string | undefined) {
|
||||
})
|
||||
|
||||
const mutationRef = useRef(updateConsentPromptDate)
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
mutationRef.current = updateConsentPromptDate
|
||||
|
||||
const [shouldOpenInitially, setShouldOpenInitially] = useState(false)
|
||||
@@ -99,6 +100,7 @@ export default function ProfilingConsentModal({
|
||||
useUpdateProfilingConsent()
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
if (shouldOpenInitially) setOpen(true)
|
||||
}, [shouldOpenInitially])
|
||||
|
||||
@@ -112,6 +114,7 @@ export default function ProfilingConsentModal({
|
||||
}, [memberKey])
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
if (isSuccess) onClose()
|
||||
}, [isSuccess, onClose])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user