perf: avoid layout re-rendering
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Link } from '../custom/link';
|
||||
import { CustomLink } from '../custom/customLink';
|
||||
import { Note } from './components/note';
|
||||
import Template from './template';
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function ConfirmationTemplate(code: string) {
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
<CustomLink
|
||||
path={`${process.env.HOME_URL}/confirmation?code=${code}`}
|
||||
text='Confirm subscription'
|
||||
/>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
export const sayings = [
|
||||
'hot off the press',
|
||||
'straight from the oven',
|
||||
"straight from the horse's mouth",
|
||||
'brand spanking new',
|
||||
'fresh as a daisy',
|
||||
'straight out of the box',
|
||||
'straight off the assembly line',
|
||||
'hot out of the kitchen',
|
||||
'just minted',
|
||||
'freshly brewed',
|
||||
'just off the production line'
|
||||
];
|
||||
13
components/emails/helpers/sayings.ts
Normal file
13
components/emails/helpers/sayings.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const sayings = [
|
||||
'hot off the press',
|
||||
'straight from the oven',
|
||||
"straight from the horse's mouth",
|
||||
'brand spanking new',
|
||||
'fresh as a daisy',
|
||||
'straight out of the box',
|
||||
'straight off the assembly line',
|
||||
'hot out of the kitchen',
|
||||
'just minted',
|
||||
'freshly brewed',
|
||||
'just off the production line'
|
||||
];
|
||||
@@ -1,12 +1,11 @@
|
||||
import { z } from 'zod';
|
||||
import { NewsSchema } from '../../utils/schemas';
|
||||
import { sayings } from './helpers/newsletterSayings';
|
||||
import { sayings } from './helpers/sayings';
|
||||
import Template from './template';
|
||||
|
||||
export default function NewsletterTemplate(
|
||||
stories: z.infer<typeof NewsSchema>[]
|
||||
) {
|
||||
|
||||
return {
|
||||
subject: `What's new from the Hackernews forum?`,
|
||||
template: (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Link } from '../custom/link';
|
||||
import { CustomLink } from '../custom/customLink';
|
||||
import { Note } from './components/note';
|
||||
import Template from './template';
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function UnsubscribeTemplate() {
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<Link path='/' text='Re-subscribe' />
|
||||
<CustomLink path='/' text='Re-subscribe' />
|
||||
</div>
|
||||
<Note>
|
||||
If you have any questions or concerns, please feel free to{' '}
|
||||
|
||||
Reference in New Issue
Block a user