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:
@@ -23,6 +23,7 @@ export function AddAncillaryProvider({
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const storeRef = useRef<AddAncillaryStore>(undefined)
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
if (!storeRef.current) {
|
||||
storeRef.current = createAddAncillaryStore(booking, ancillaries)
|
||||
}
|
||||
@@ -40,6 +41,7 @@ export function AddAncillaryProvider({
|
||||
}, [])
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
<AddAncillaryContext.Provider value={storeRef.current}>
|
||||
{children}
|
||||
</AddAncillaryContext.Provider>
|
||||
|
||||
@@ -23,6 +23,7 @@ export default function DestinationDataProvider({
|
||||
const storeRef = useRef<DestinationDataStore>(undefined)
|
||||
const searchParams = useSearchParams()
|
||||
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
if (!storeRef.current) {
|
||||
storeRef.current = createDestinationDataStore({
|
||||
allCities,
|
||||
@@ -36,6 +37,7 @@ export default function DestinationDataProvider({
|
||||
}
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
<DestinationDataContext.Provider value={storeRef.current}>
|
||||
<DestinationDataProviderContent>
|
||||
{children}
|
||||
|
||||
@@ -20,6 +20,7 @@ export default function HotelListingDataProvider({
|
||||
const storeRef = useRef<HotelListingDataStore>(undefined)
|
||||
const searchParams = useSearchParams()
|
||||
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
if (!storeRef.current) {
|
||||
storeRef.current = createHotelListingDataStore({
|
||||
allHotels,
|
||||
@@ -30,6 +31,7 @@ export default function HotelListingDataProvider({
|
||||
}
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
<HotelListingDataContext.Provider value={storeRef.current}>
|
||||
<HotelListingDataProviderContent>
|
||||
{children}
|
||||
|
||||
@@ -101,6 +101,7 @@ export default function MyStayProvider({
|
||||
(isFetchedAfterMount && data) ||
|
||||
(linkedReservationsIsFetchedAfterMount && linkedReservations)
|
||||
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
if (!storeRef.current || hasInvalidatedQueryAndRefetched) {
|
||||
storeRef.current = createMyStayStore({
|
||||
breakfastPackages,
|
||||
@@ -116,6 +117,7 @@ export default function MyStayProvider({
|
||||
}
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react-hooks/refs
|
||||
<MyStayContext.Provider value={storeRef.current}>
|
||||
{children}
|
||||
</MyStayContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user