Skip to content

Commit

Permalink
fix: wrap proposed options
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Oct 8, 2024
1 parent 08a1255 commit 1d73a39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/components/AddProposal/AddProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ export const AddProposal = () => {
};

const handleSubmit = () => {
if (options.length === 0) {
showToast("No options selected", ToastType.Warn);
return;
}
const payload = options
.filter((o) => o.active !== false) // filter out active = false (duplicate with live options)
.flatMap((o) => {
Expand Down
2 changes: 0 additions & 2 deletions src/components/AddProposal/ProposalText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ export const ProposalText = ({

return (
<div className={styles.proposaltext}>
<p>This proposal adds following options:</p>
<br />
{texts.map((t) => {
if (t === "") {
return <br />;
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddProposal/prop.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

.optionboxcontainer {
display: flex;
flex-flow: column;
flex-wrap: wrap;
gap: 10px;
margin-top: 20px;
}
Expand Down

0 comments on commit 1d73a39

Please sign in to comment.