Skip to content

Commit

Permalink
Removed zero state. Page can't have no selected places.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Apr 23, 2024
1 parent 7d7723a commit 434062e
Showing 1 changed file with 10 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/no-unescaped-entities */
import React, {
ComponentType,
ForwardedRef,
Expand Down Expand Up @@ -113,31 +112,19 @@ const ConfigureScreensWorkflowPage: ComponentType<ConfigureScreensWorkflowPagePr
});
};

let layout;
if (selectedPlaces.length) {
layout = selectedPlaces.map((place) => {
return (
<ConfigurePlaceCard
key={place.id}
place={place}
existingScreens={existingScreens[place.id]}
setPlacesAndScreensToUpdate={setPlacesAndScreensToUpdate}
/>
);
});
} else {
layout = (
<div>
All locations have been removed. Select "Back" to select new
locations.
</div>
);
}

return (
<Container className="workflow-container">
<div className="h3 text-white mb-5">{getTitle()}</div>
{layout}
{selectedPlaces.map((place) => {
return (
<ConfigurePlaceCard
key={place.id}
place={place}
existingScreens={existingScreens[place.id]}
setPlacesAndScreensToUpdate={setPlacesAndScreensToUpdate}
/>
);
})}
</Container>
);
};
Expand Down

0 comments on commit 434062e

Please sign in to comment.