fix(bookings): keep the review's map status within the complexity and strict-null budgets

The status hides itself for a stay linked to a trip place instead of each form
branching around it, and a lookup takes a missing name.
This commit is contained in:
Maurice
2026-10-25 18:30:27 +01:00
parent b80fdf27f2
commit 44509723fd
5 changed files with 30 additions and 13 deletions
@@ -5,6 +5,8 @@ import type { StayPin } from './useStayPin';
interface StayPinStatusProps {
pin: StayPin;
/** A stay already linked to a place of the trip shows on the map through that place. */
hidden?: boolean;
/** Asks the map again with what the form now holds. */
onRetry: () => void;
}
@@ -15,9 +17,9 @@ interface StayPinStatusProps {
* found, with a way to search again before it is saved without a pin. Shared by
* the desktop booking dialog and the phone's booking sheet.
*/
export default function StayPinStatus({ pin, onRetry }: StayPinStatusProps) {
export default function StayPinStatus({ pin, hidden = false, onRetry }: StayPinStatusProps) {
const { t } = useTranslation();
if (pin.status === 'idle') return null;
if (hidden || pin.status === 'idle') return null;
if (pin.status === 'searching') {
return (