The only idea I have now is
if (customFields.values[0]) {<View style={styles.borderContainer} />; }
For this array
let customFields: Array<{ value: any; label: string; }> = []; if (query.data) { customFields = query.data.current_squad.custom_fields .filter( (customField) => customField.is_visible_on_squads && customField.custom_field_value.value ) .map((customField) => { return { value: customField.custom_field_value.value, label: customField.title, }; }); } }
But that doesn't work obviously.The end goal is to make a border at the last place in the array which is based on however many custom fields one makes.I am new to frontend and JS languages so any pointer to the right direction would be greatly appreciated.