Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default function StrategySelectorForm({
callToAction = () => {},
// callback to return strategies selected
onStrategySelection,
enableDelUniqueItem,
} = {}) {
// holds array of objects with strategy information
const [strategies, setStrategies] = useState(existingStrategies);
Expand Down Expand Up @@ -58,8 +59,8 @@ export default function StrategySelectorForm({
setStrategies((state) => state.filter((_, idx) => idx !== index));
};

// hide delete when there's only one strategy
const enableDelete = strategies.length > 1;
// hide delete when there's only one strategy unless passed by prop
const enableDelete = enableDelUniqueItem ?? strategies.length > 1;

const callToActionComponent = callToAction(strategies);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function StepFour({
<StrategySelectorForm
existingStrategies={strategies}
onStrategySelection={onStrategySelection}
enableDelUniqueItem
callToAction={() => {
return (
<ActionButton
Expand Down
4 changes: 2 additions & 2 deletions frontend/packages/client/src/pages/CommunityEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export default function CommunityEditorPage() {
// initial loading
if (loading && !community) {
return (
<section className="section">
<div className="container is-flex full-height">
<section className="section full-height">
<div className="container is-flex full-height is-justify-content-center">
<Loader fullHeight />
</div>
</section>
Expand Down