toggleExpanded(v.id)}
- aria-expanded={isOpen}
- >
- {isOpen ? (
-
- ) : (
-
- )}
+
+
+
+ toggleSelected(v.id)}
+ aria-label={`Select ${v.name}`}
+ />
+ {v.name}
+
+
+
+ Friends invited:
+ {' '}
+ {v.friendsInvited || 0}
+
+ openRowMenu(e, v)}>
+
+
+ toggleExpanded(v.id)} aria-expanded={isOpen}>
+
-
- )}
+
+
-
- {v.publicOpinion ? (
- {isOpen ? v.publicOpinion : '...'}
+ What you can do
+
+ {v.endorsed && (
+ alert(`Give thumbs up on endorsement/opinion for ${v.name}`)}>
+ Give thumbs up on endorsement/opinion
+
+ )}
+ {hasMessageSent ? (
+
+ Message sent (
+ {v.messageSentCount}
+ )
+
) : (
- No public opinion available.
+ (needsAction ?
+ alert(`${v.endorsed ? 'Send thanks' : 'Send message'} & ask ${v.name} to ${actions}`) :
+ alert(`Send thanks to ${v.name}`))}
+ >
+ {needsAction && !v.endorsed ? 'Send message' : 'Send thanks'}
+
)}
-
-
+
- {/* MOBILE: expanded details under the action buttons */}
-
{isOpen && (
-
- Public sentiment/opinion
-
-
+ <>
+ Public sentiment/opinion
+
+
{v.endorsed ? (
<>
- Endorsed
+
+ {' '}
+ Endorsed
>
- ) : (
- <>Not endorsed>
- )}
+ ) : 'Not endorsed'}
- {v.publicOpinion ? (
- {v.publicOpinion}
+ {hasOpinion ? (
+ {v.publicOpinion}
) : (
- No public opinion available.
+ No public opinion available.
)}
-
-
+
+
+ {needsAction && (
+ <>
+ What you can ask voters to do
+ {actions}
+ >
+ )}
+ >
)}
@@ -702,99 +521,56 @@ export default function SupportersJoined ({ supporters }) {
})}
-
-
- Send Message to Selected ({selectedVoters.length})
-
-
-
-
-
- {/* Drawer that opens with the candidate view of a voter, from "View on candidate page" link */}
+
+
+ rowMenuVoter && alert(`Edit voter: ${rowMenuVoter.name}`) },
+ { icon: MailOutlineIcon,
+ label: 'Send message',
+ onClick: () => rowMenuVoter && alert(`Send message to: ${rowMenuVoter.name}`) },
+ ]}
+ />
+
-
-
+
+
Candidate page
-
-
-
-
- {/* http://localhost:3000/shannon-d-dicus-politician-from-california/-/ */}
-
-
-
+
+
+
+
- {/* Pop up to display when a user views the Thank You message */}
-