MCPcopy
hub / github.com/joschan21/digitalhippo / ReceiptEmail

Function ReceiptEmail

src/components/emails/ReceiptEmail.tsx:31–198  ·  view source on GitHub ↗
({
  email,
  date,
  orderId,
  products,
}: ReceiptEmailProps)

Source from the content-addressed store, hash-verified

29}
30
31export const ReceiptEmail = ({
32 email,
33 date,
34 orderId,
35 products,
36}: ReceiptEmailProps) => {
37 const total =
38 products.reduce((acc, curr) => acc + curr.price, 0) + 1
39
40 return (
41 <Html>
42 <Head />
43 <Preview>Your DigitalHippo Receipt</Preview>
44
45 <Body style={main}>
46 <Container style={container}>
47 <Section>
48 <Column>
49 <Img
50 src={`${process.env.NEXT_PUBLIC_SERVER_URL}/hippo-email-sent.png`}
51 width='100'
52 height='100'
53 alt='DigitalHippo'
54 />
55 </Column>
56
57 <Column align='right' style={tableCell}>
58 <Text style={heading}>Receipt</Text>
59 </Column>
60 </Section>
61 <Section style={informationTable}>
62 <Row style={informationTableRow}>
63 <Column style={informationTableColumn}>
64 <Text style={informationTableLabel}>
65 EMAIL
66 </Text>
67 <Link
68 style={{
69 ...informationTableValue,
70 }}>
71 {email}
72 </Link>
73 </Column>
74
75 <Column style={informationTableColumn}>
76 <Text style={informationTableLabel}>
77 INVOICE DATE
78 </Text>
79 <Text style={informationTableValue}>
80 {format(date, 'dd MMM yyyy')}
81 </Text>
82 </Column>
83
84 <Column style={informationTableColumn}>
85 <Text style={informationTableLabel}>
86 ORDER ID
87 </Text>
88 <Link

Callers

nothing calls this directly

Calls 1

formatPriceFunction · 0.90

Tested by

no test coverage detected