diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 9f7c862..513fbf4 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -14240,6 +14240,7 @@ function AddListingPage({ editListingId }: { editListingId?: number }) {
// dalej, zeby nie krzyczec o brakach zanim uzytkownik cokolwiek wypelni.
const [showDetailsError, setShowDetailsError] = useState(false);
const [showLocationError, setShowLocationError] = useState(false);
+ const [showPhotosError, setShowPhotosError] = useState(false);
const [listingDetails, setListingDetails] = useState(INITIAL_LISTING_DETAILS);
// Ekran startowy z wyborem "Chcę sprzedać / wynająć" + kategorii. Przy edycji pomijamy go i od razu
// pokazujemy formularz. Wybor kategorii ustawia transakcje i rodzaj, a potem wchodzimy w kreator.
@@ -14640,8 +14641,17 @@ function AddListingPage({ editListingId }: { editListingId?: number }) {
});
return;
}
+ // Krok "Zdjęcia" (currentStep 2) - wymagamy przynajmniej jednego zdjecia, zeby przejsc dalej.
+ if (currentStep === 2 && step > 2 && photos.length === 0) {
+ setShowPhotosError(true);
+ window.requestAnimationFrame(() => {
+ document.querySelector('.add-step-error')?.scrollIntoView({ behavior: 'smooth', block: 'center' });
+ });
+ return;
+ }
setShowDetailsError(false);
setShowLocationError(false);
+ setShowPhotosError(false);
setCurrentStep(step);
window.requestAnimationFrame(() => {
document.querySelector('.add-page')?.scrollIntoView({ behavior: 'smooth', block: 'start' });
@@ -15328,6 +15338,12 @@ function AddListingPage({ editListingId }: { editListingId?: number }) {
{virtualTourError &&
{virtualTourError}
}
+ {showPhotosError && photos.length === 0 && (
+
+ Dodaj przynajmniej jedno zdjęcie, aby przejść dalej.
+
+ )}
+