|
| 1 | +import { |
| 2 | + Column, |
| 3 | + Container, |
| 4 | + Hr, |
| 5 | + Img, |
| 6 | + Link, |
| 7 | + Preview, |
| 8 | + Row, |
| 9 | + Section, |
| 10 | + Text, |
| 11 | +} from "@react-email/components"; |
| 12 | +import * as React from "react"; |
| 13 | + |
| 14 | +import { BigFooter, TicketTemplate } from "emails/templates/helpers/tickets"; |
| 15 | + |
| 16 | +interface EmailProps { |
| 17 | + eventName: string; |
| 18 | + userTicketId: string; |
| 19 | + userName?: string; |
| 20 | + eventLogoCloudflareImageURL: string; |
| 21 | + userEmail: string; |
| 22 | +} |
| 23 | + |
| 24 | +export const TicketConfirmation = ({ |
| 25 | + eventName, |
| 26 | + userTicketId, |
| 27 | + userName, |
| 28 | + userEmail, |
| 29 | + eventLogoCloudflareImageURL, |
| 30 | +}: EmailProps) => { |
| 31 | + return ( |
| 32 | + <TicketTemplate theme="light"> |
| 33 | + <Container className="px-10 py-10 w-full max-w-3xl font-light"> |
| 34 | + <Section className=""> |
| 35 | + <Preview>Tu ticket para {eventName}</Preview> |
| 36 | + <Row className="h-20 mb-14"> |
| 37 | + <Column> |
| 38 | + <Img |
| 39 | + src={`${eventLogoCloudflareImageURL}/w=300,fit=scale-down`} |
| 40 | + className="w-full max-w-[200px]" |
| 41 | + /> |
| 42 | + </Column> |
| 43 | + </Row> |
| 44 | + |
| 45 | + <Text className="text-2xl mb-6"> |
| 46 | + {userName ? `Hola ${userName},` : "Hola,"} |
| 47 | + </Text> |
| 48 | + |
| 49 | + <Text className="text-xl mb-8"> |
| 50 | + Este es tu ticket para el evento: |
| 51 | + </Text> |
| 52 | + |
| 53 | + <Text className="text-xl text-center mb-16 px-8 text-gray-400"> |
| 54 | + {eventName} |
| 55 | + </Text> |
| 56 | + |
| 57 | + <Row> |
| 58 | + <Img |
| 59 | + className="px-20 mb-16" |
| 60 | + src={`https://svg-renderer.communityos.io/qr/svg/${userTicketId}`} |
| 61 | + /> |
| 62 | + </Row> |
| 63 | + |
| 64 | + <Text className="text-xl mb-16"> |
| 65 | + Recuerda llevar este ticket contigo el día del evento. <br /> |
| 66 | + También está disponible el tu perfil de CommunityOS, ingresa con tu |
| 67 | + correo <span className="font-semibold">{userEmail}</span> en{" "} |
| 68 | + <Link href="https://communityos.io/ai-hackathon/tickets"> |
| 69 | + communityos.io/ai-hackathon/tickets |
| 70 | + </Link> |
| 71 | + . |
| 72 | + </Text> |
| 73 | + |
| 74 | + <Text className="text-xl mb-8">Nos vemos en el evento,</Text> |
| 75 | + <Text className="text-xl font-semibold mb-8">Equipo CommunityOS</Text> |
| 76 | + |
| 77 | + <Text className="text-xl mb-8"></Text> |
| 78 | + </Section> |
| 79 | + <Hr className="my-8 border-black" /> |
| 80 | + <BigFooter theme="light" /> |
| 81 | + </Container> |
| 82 | + </TicketTemplate> |
| 83 | + ); |
| 84 | +}; |
| 85 | + |
| 86 | +TicketConfirmation.PreviewProps = { |
| 87 | + eventName: "El Potencial Clave de la Recuperación Aumentada (RAG) con OpenAI", |
| 88 | + userName: "John Doe", |
| 89 | + userTicketId: "c7fa5dc0-ffa2-4369-bac7-3aa52d7cc640", |
| 90 | + eventLogoCloudflareImageURL: |
| 91 | + "https://imagedelivery.net/dqFoxiedZNoncKJ9uqxz0g/6cdd148e-b931-4b7a-f983-d75d388aff00", |
| 92 | + userEmail: "fake@email.com", |
| 93 | +} satisfies EmailProps; |
| 94 | + |
| 95 | +export default TicketConfirmation; |
0 commit comments