refactor(templates): extract Signature to own component

This commit is contained in:
Julien Oculi 2024-04-02 17:28:35 +02:00
parent c5a1be21ca
commit 0b0642a290
3 changed files with 26 additions and 17 deletions

View file

@ -1,4 +1,5 @@
import { Body, Html, Markdown, Preview, Section, Text } from 'jsx-email'
import { Signature } from './_Signature.tsx'
import type { Template } from '../types.ts'
function Message(
@ -12,6 +13,7 @@ function Message(
<Section>
<Text>Coh@bit</Text>
</Section>
<Signature />
</Body>
</Html>
)

View file

@ -8,6 +8,7 @@ import {
Section,
Text,
} from 'jsx-email'
import { Signature } from './_Signature.tsx'
import type { Template } from '../types.ts'
function Welcome(
@ -73,23 +74,7 @@ function Welcome(
</Button>
</Section>
</Container>
<Container>
<Section>
<Text>
<a href='https://cohabit.fr'>Accéder au site </a>
</Text>
<Text>
<a href='tel:0556847961'>Nous téléphoner </a>
</Text>
<Text>
<a href='mailto:fablab@iut.u-bordeaux.fr'>Nous contacter </a>
</Text>
</Section>
<Text>
Coh@bit, IUT de Bordeaux, Bâtiment 10A, 15 rue Naudet, 33170
GRADIGNAN
</Text>
</Container>
<Signature />
</Body>
</Html>
)

22
templates/_Signature.tsx Normal file
View file

@ -0,0 +1,22 @@
import { Container, Section, Text } from 'jsx-email'
export function Signature() {
return (
<Container>
<Section>
<Text>
<a href='https://cohabit.fr'>Accéder au site </a>
</Text>
<Text>
<a href='tel:0556847961'>Nous téléphoner </a>
</Text>
<Text>
<a href='mailto:fablab@iut.u-bordeaux.fr'>Nous contacter </a>
</Text>
</Section>
<Text>
Coh@bit, IUT de Bordeaux, Bâtiment 10A, 15 rue Naudet, 33170 GRADIGNAN
</Text>
</Container>
)
}