Skip to content

Commit

Permalink
move RemixForm
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-salgado committed Apr 2, 2024
1 parent 6defa42 commit 5eaf2e6
Showing 1 changed file with 32 additions and 35 deletions.
67 changes: 32 additions & 35 deletions apps/member-profile/app/routes/_profile.profile.emails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,42 +145,39 @@ function EmailAddressSection() {
school, personal, work), please add them here. Your primary email is the
email where you will receive all ColorStack communications.
</ProfileDescription>
<RemixForm className="form" method="post">
<ul className="flex flex-col gap-2">
{emails.map((email) => {
return (
<li
className={cx(
'flex items-center justify-between rounded-lg border border-solid p-2',
email.primary ? 'border-gold bg-gold-100' : 'border-gray-200'
)}
key={email.email}
>
<Text>{email.email}</Text>

{email.primary && (
<Text
className="font-medium uppercase text-gold"
variant="sm"
>
Primary
</Text>
)}
</li>
);
})}
</ul>
<Button.Group>
<Button onClick={onAddEmail} size="small" variant="secondary">
<Plus /> Add Email
<ul className="flex flex-col gap-2">
{emails.map((email) => {
return (
<li
className={cx(
'flex items-center justify-between rounded-lg border border-solid p-2',
email.primary ? 'border-gold bg-gold-100' : 'border-gray-200'
)}
key={email.email}
>
<Text>{email.email}</Text>

{email.primary && (
<Text className="font-medium uppercase text-gold" variant="sm">
Primary
</Text>
)}
</li>
);
})}
</ul>
<Button.Group>
<Button onClick={onAddEmail} size="small" variant="secondary">
<Plus /> Add Email
</Button>

{emails.length > 1 && (
<Button color="primary" onClick={onChangePrimaryEmail} size="small">
<Edit /> Change Primary
</Button>

{emails.length > 1 && (
<Button color="primary" onClick={onChangePrimaryEmail} size="small">
<Edit /> Change Primary
</Button>
)}
</Button.Group>
)}
</Button.Group>
<RemixForm className="form" method="post">
<Form.Field
description="If you go to school where there is a ColorStack chapter, this will allow that chapter leader to reach out to you about local events and opportunities."
error={errors.allowEmailShare}
Expand Down

0 comments on commit 5eaf2e6

Please sign in to comment.