Skip to content

Commit

Permalink
update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiAbdou committed Jul 23, 2024
1 parent be8947d commit 7f96332
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
8 changes: 4 additions & 4 deletions apps/admin-dashboard/app/routes/_dashboard.students.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,14 @@ function StudentDropdown({ activatedAt, airtableUri, id }: StudentInView) {
</Dropdown.Item>

<Dropdown.Item>
<Link to={generatePath(Route['/students/:id/remove'], { id })}>
<Trash /> Delete Member
<Link target="_blank" to={airtableUri} rel="noopener noreferrer">
<ExternalLink /> View Airtable Record
</Link>
</Dropdown.Item>

<Dropdown.Item>
<Link target="_blank" to={airtableUri} rel="noopener noreferrer">
<ExternalLink /> View Airtable Record
<Link to={generatePath(Route['/students/:id/remove'], { id })}>
<Trash /> Remove Member
</Link>
</Dropdown.Item>
</Dropdown.List>
Expand Down
4 changes: 3 additions & 1 deletion packages/email-templates/emails/components/email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Email.Preview = function EmailPreview({ children }: EmailPreviewProps) {
};

type EmailSignatureProps = {
children?: React.ReactNode;
type?: 'colorstack' | 'jehron';
};

Expand All @@ -158,11 +159,12 @@ const EmailSignatureContent: Record<
};

Email.Signature = function EmailSignature({
children,
type = 'colorstack',
}: EmailSignatureProps) {
return (
<Email.Text marginBottom="0px" marginTop="32px">
{EmailSignatureContent[type]}
{children || EmailSignatureContent[type]}
</Email.Text>
);
};
Expand Down
26 changes: 20 additions & 6 deletions packages/email-templates/emails/student-removed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,40 @@ import React from 'react';
import { Email } from './components/email';
import { type EmailTemplateData } from '../src/types';

export function StudentRemovedEmail(_: EmailTemplateData<'student-removed'>) {
export function StudentRemovedEmail({
firstName,
}: EmailTemplateData<'student-removed'>) {
return (
<Email.Template>
<Email.Preview>
You have violated the ColorStack Code of Conduct.
</Email.Preview>

<Email.Main>
<Email.Text>We're here with some unfortunate news.</Email.Text>
<Email.Text>Hello {firstName},</Email.Text>

<Email.Text>
You have violated the{' '}
We are informing you that you have violated the{' '}
<Email.Link href="https://docs.google.com/document/d/10hIOyIJQAdU4ZTvil5ECmRlM34Ds0dPGFNpg18WQ1js">
ColorStack Code of Conduct
</Email.Link>
, and as a result you have been permanently banned from the ColorStack
community.
.
<br />
<br />
There have been reports with evidence of you being disrespectful,
harassing, and/or violent. We have a zero-tolerance policy for this
type of behavior within our community. As a result, you are being
permanently removed from the ColorStack Family.
<br />
<br />
This decision is final.
</Email.Text>

<Email.Signature />
<Email.Signature>
Regards,
<br />
The ColorStack Team
</Email.Signature>
</Email.Main>
</Email.Template>
);
Expand Down
4 changes: 3 additions & 1 deletion packages/email-templates/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export const EmailTemplate = z.discriminatedUnion('name', [
}),
BaseEmail.extend({
name: z.literal('student-removed'),
data: z.object({}),
data: z.object({
firstName: z.string().trim().min(1),
}),
}),
]);

Expand Down

0 comments on commit 7f96332

Please sign in to comment.