Merged in feature/select-rate-vertical-data-flow (pull request #2535)

Feature/select rate vertical data flow

* add fix from SW-2666

* use translations for room packages

* move types to it's own file

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/select-rate-vertical-data-flow

* merge

* feature/select-rate: double rate for campaing rates

* revert NODE_ENV check in Cookiebot script

* revert testing values

* fix(SW-3171): fix all filter selected in price details

* fix(SW-3166): multiroom anchoring when changing filter

* fix(SW-3172): check hotelType, show correct breakfast message

* Merge branch 'feature/select-rate-vertical-data-flow' of bitbucket.org:scandic-swap/web into feature/select-rate-vertical-data-flow

* fix: show special needs icons for subsequent roomTypes SW-3167

* fix: Display strike through text when logged in SW-3168

* fix: Reinstate the scrollToView behaviour when selecting a rate SW-3169

* merge

* .

* PR fixes

* fix: don't return notFound()

* .

* always include defaults for room packages

* merge

* merge

* merge

* Remove floating h1 for new select-rate


Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-08-13 12:45:40 +00:00
parent 706f2d8dfe
commit 68cd061c6d
126 changed files with 8751 additions and 315 deletions

View File

@@ -9,7 +9,7 @@ type ErrorBoundaryProps = {
}
type ErrorBoundaryState = { hasError: boolean; error?: Error }
class ErrorBoundary extends React.Component<
export class ErrorBoundary extends React.Component<
ErrorBoundaryProps,
ErrorBoundaryState
> {
@@ -29,15 +29,27 @@ class ErrorBoundary extends React.Component<
render() {
if (this.state.hasError) {
if (this.props.fallback) {
return this.props.fallback
}
const hasFallback = !!this.props.fallback
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
return <h2>Something went wrong.</h2>
return (
<>
{hasFallback && this.props.fallback}
{!hasFallback && (
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
<h2>Something went wrong.</h2>
)}
{process.env.NODE_ENV === "development" && (
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
<button onClick={() => this.setState({ hasError: false })}>
Reset
</button>
)}
</>
)
return this.props.fallback
}
return this.props.children
}
}
export default ErrorBoundary