Skip to content

Commit 299dd56

Browse files
Merge pull request #77 from SingularityNET-Archive:development
Fixed clear button issue on some templates
2 parents 1397721 + 2b11763 commit 299dd56

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/SummaryAgendaItems.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ const SummaryAgendaItems = ({ onUpdate }: any) => {
432432
{myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1 && item.agenda == '' && (<button className={styles['remove-button']} type="button" onClick={() => removeAgendaItem(agendaIndex)}>Remove Agenda</button>)}
433433
</div>
434434
))}
435-
{myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1 && (<button className={styles['add-button']} type="button" onClick={addAgendaItem}>Add Agenda Item</button>)}
435+
{((myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 0 && agendaItems.length == 0) ||
436+
(myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1))
437+
&& (<button className={styles['add-button']} type="button" onClick={addAgendaItem}>Add Agenda Item</button>)}
436438
</div>
437439
);
438440
};

0 commit comments

Comments
 (0)