feat: user activation and emails
This commit is contained in:
19
components/emails/newsletter.tsx
Normal file
19
components/emails/newsletter.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Container } from '@react-email/container';
|
||||
import { Html } from '@react-email/html';
|
||||
import { Section } from '@react-email/section';
|
||||
import { Text } from '@react-email/text';
|
||||
import { container, main, paragraph } from './utils/styling';
|
||||
|
||||
export default function NewsletterEmail(ids: number[]) {
|
||||
return (
|
||||
<Html>
|
||||
<Section style={main}>
|
||||
<Container style={container}>
|
||||
<Text style={paragraph}>
|
||||
These were the ids retrieved: {ids.join(', ')}
|
||||
</Text>
|
||||
</Container>
|
||||
</Section>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
23
components/emails/subscribe.tsx
Normal file
23
components/emails/subscribe.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Container } from '@react-email/container';
|
||||
import { Html } from '@react-email/html';
|
||||
import { Section } from '@react-email/section';
|
||||
import { Text } from '@react-email/text';
|
||||
import { container, main, paragraph } from './utils/styling';
|
||||
|
||||
export default function SubscribeEmail(code: string) {
|
||||
return (
|
||||
<Html>
|
||||
<Section style={main}>
|
||||
<Container style={container}>
|
||||
<Text style={paragraph}>
|
||||
To confirm the subscription, please click{' '}
|
||||
<a href={`${process.env.HOME_URL}/confirmation?code=${code}`}>
|
||||
here
|
||||
</a>
|
||||
.
|
||||
</Text>
|
||||
</Container>
|
||||
</Section>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
19
components/emails/unsubscribe.tsx
Normal file
19
components/emails/unsubscribe.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Container } from '@react-email/container';
|
||||
import { Html } from '@react-email/html';
|
||||
import { Section } from '@react-email/section';
|
||||
import { Text } from '@react-email/text';
|
||||
import { container, main, paragraph } from './utils/styling';
|
||||
|
||||
export default function UnsubscribeEmail() {
|
||||
return (
|
||||
<Html>
|
||||
<Section style={main}>
|
||||
<Container style={container}>
|
||||
<Text style={paragraph}>
|
||||
You have unsubscribed from the newsletter.
|
||||
</Text>
|
||||
</Container>
|
||||
</Section>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
15
components/emails/utils/styling.ts
Normal file
15
components/emails/utils/styling.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const main = {
|
||||
backgroundColor: '#ffffff'
|
||||
};
|
||||
|
||||
export const container = {
|
||||
margin: '0 auto',
|
||||
padding: '20px 0 48px',
|
||||
width: '580px'
|
||||
};
|
||||
|
||||
export const paragraph = {
|
||||
fontSize: '18px',
|
||||
lineHeight: '1.4',
|
||||
color: '#484848'
|
||||
};
|
||||
Reference in New Issue
Block a user