From 0b0642a29018e6f3a2860d531a067f3508cc6cd1 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Tue, 2 Apr 2024 17:28:35 +0200 Subject: [PATCH] refactor(templates): extract `Signature` to own component --- templates/Message.tsx | 2 ++ templates/Welcome.tsx | 19 ++----------------- templates/_Signature.tsx | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 templates/_Signature.tsx diff --git a/templates/Message.tsx b/templates/Message.tsx index 6accd8d..fe09d14 100644 --- a/templates/Message.tsx +++ b/templates/Message.tsx @@ -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(
Coh@bit
+ ) diff --git a/templates/Welcome.tsx b/templates/Welcome.tsx index a02f84e..b457cee 100644 --- a/templates/Welcome.tsx +++ b/templates/Welcome.tsx @@ -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( - -
- - Accéder au site → - - - Nous téléphoner → - - - Nous contacter → - -
- - Coh@bit, IUT de Bordeaux, Bâtiment 10A, 15 rue Naudet, 33170 - GRADIGNAN - -
+ ) diff --git a/templates/_Signature.tsx b/templates/_Signature.tsx new file mode 100644 index 0000000..d21b23c --- /dev/null +++ b/templates/_Signature.tsx @@ -0,0 +1,22 @@ +import { Container, Section, Text } from 'jsx-email' + +export function Signature() { + return ( + +
+ + Accéder au site → + + + Nous téléphoner → + + + Nous contacter → + +
+ + Coh@bit, IUT de Bordeaux, Bâtiment 10A, 15 rue Naudet, 33170 GRADIGNAN + +
+ ) +}