The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Fix the react email templates preview
Kiran K8bd23d0ff14a
diff --git a/packages/email/package.json b/packages/email/package.jsonindex 16a51ddfb9..e81add9379 100644--- a/packages/email/package.json+++ b/packages/email/package.json@@ -11,6 +11,7 @@"@dub/utils": "workspace:*","@react-email/components": "^1.0.2","@react-email/markdown": "^0.0.17",+ "@react-email/preview-server": "5.1.0","@react-email/render": "^2.0.0","date-fns": "^4.1.0","lucide-react": "^0.462.0",diff --git a/packages/email/src/templates/new-bounty-available.tsx b/packages/email/src/templates/new-bounty-available.tsxindex 42320e29ef..30970e9eef 100644--- a/packages/email/src/templates/new-bounty-available.tsx+++ b/packages/email/src/templates/new-bounty-available.tsx@@ -74,17 +74,17 @@ export default function NewBountyAvailable({</Section>{bounty.description && (- <Section className="flex border-t border-solid border-neutral-200 p-6">+ <Section className="border-t border-solid border-neutral-200 p-6"><Text className="m-0 p-0 text-sm font-semibold text-neutral-900">Details</Text>- <Text className="m-0 mt-2 p-0 text-sm font-medium text-neutral-500">+ <Section className="p-0 text-sm font-medium text-neutral-500"><MarkdownmarkdownCustomStyles={{ link: { color: "black" } }}>{bounty.description}</Markdown>- </Text>+ </Section></Section>)}diff --git a/packages/email/src/templates/new-sale-alert-program-owner.tsx b/packages/email/src/templates/new-sale-alert-program-owner.tsxindex ff184bbb90..a852249ad1 100644--- a/packages/email/src/templates/new-sale-alert-program-owner.tsx+++ b/packages/email/src/templates/new-sale-alert-program-owner.tsx@@ -126,7 +126,7 @@ export default function NewSaleAlertProgramOwner({</Text><Section className="my-8 w-full">- <div className="rounded-lg border border-neutral-200">+ <div className="rounded-lg"><Row><Column><Text className="m-0 text-sm leading-6 text-neutral-600">diff --git a/packages/email/src/templates/partner-program-summary.tsx b/packages/email/src/templates/partner-program-summary.tsxindex 66b044fee3..684f05282c 100644--- a/packages/email/src/templates/partner-program-summary.tsx+++ b/packages/email/src/templates/partner-program-summary.tsx@@ -186,7 +186,7 @@ export default function PartnerProgramSummary({<Preview>{`Your ${reportingPeriod.month} performance report for ${program.name} program.`}</Preview><Tailwind><Body className="mx-auto my-auto bg-white font-sans">- <Container className="mx-auto my-10 max-w-[600px] space-y-10 px-3 py-5">+ <Container className="mx-auto my-10 max-w-[600px] gap-y-10 px-3 py-5"><Section className="mt-8"><Img src={DUB_WORDMARK} height="32" alt={program.name} /></Section>@@ -219,7 +219,7 @@ export default function PartnerProgramSummary({</div></Section>- <Section className="space-y-6 rounded-xl border-t border-solid border-neutral-200 bg-white p-6">+ <Section className="gap-y-6 rounded-xl border-t border-solid border-neutral-200 bg-white p-6"><Section><Headingas="h4"diff --git a/packages/email/src/templates/unresolved-fraud-events-summary.tsx b/packages/email/src/templates/unresolved-fraud-events-summary.tsxindex 829e61d314..a9ed4b8b18 100644--- a/packages/email/src/templates/unresolved-fraud-events-summary.tsx+++ b/packages/email/src/templates/unresolved-fraud-events-summary.tsx@@ -111,67 +111,73 @@ export default function UnresolvedFraudEventsSummary({</Column></Row>- {displayedGroups.map((group) => (- <Row- key={group.id}- className="h-11 border-b border-solid border-neutral-200 last:border-b-0"- >- <Column width="50%" className="w-1/2 px-4" valign="middle">- <Row>- <Column width="auto" className="flex">- <Text className="m-0 text-sm font-medium text-neutral-600">- {group.name}- </Text>+ {displayedGroups.map((group, index) => {+ const isLastItem =+ index === displayedGroups.length - 1 && remainingCount === 0;+ return (+ <Row+ key={group.id}+ className={`h-11 border-solid border-neutral-200 ${+ isLastItem ? "" : "border-b"+ }`}+ >+ <Column width="50%" className="w-1/2 px-4" valign="middle">+ <Row>+ <Column width="auto" className="flex">+ <Text className="m-0 text-sm font-medium text-neutral-600">+ {group.name}+ </Text>- <div>- {group.count > 1 && (- <Text className="m-0 ml-2 rounded-md bg-neutral-100 px-1.5 py-0.5 text-xs font-semibold text-neutral-700">- {group.count}- </Text>- )}- </div>- </Column>- </Row>- </Column>+ <div>+ {group.count > 1 && (+ <Text className="m-0 ml-2 rounded-md bg-neutral-100 px-1.5 py-0.5 text-xs font-semibold text-neutral-700">+ {group.count}+ </Text>+ )}+ </div>+ </Column>+ </Row>+ </Column>- <Column width="50%" className="w-1/2 px-4" valign="middle">- <Row>- <Column width="auto">- <Img- src={- group.partner.image ||- `${OG_AVATAR_URL}${group.partner.name}`- }- width={20}- height={20}- alt={group.partner.name}- className="rounded-full"- />- </Column>+ <Column width="50%" className="w-1/2 px-4" valign="middle">+ <Row>+ <Column width="auto">+ <Img+ src={+ group.partner.image ||+ `${OG_AVATAR_URL}${group.partner.name}`+ }+ width={20}+ height={20}+ alt={group.partner.name}+ className="rounded-full"+ />+ </Column>- <Column width="auto">- <Text className="m-0 ml-1 text-sm font-medium text-neutral-600">- {group.partner.name}- </Text>- </Column>+ <Column width="auto">+ <Text className="m-0 ml-1 text-sm font-medium text-neutral-600">+ {group.partner.name}+ </Text>+ </Column>- <Column- width="10%"- className="px-4"- align="right"- valign="middle"- >- <Link- className="rounded-lg border border-solid border-neutral-300 bg-white px-2.5 py-1.5 text-sm font-medium text-neutral-700 no-underline"- href={`https://app.dub.co/${workspace.slug}/program/fraud?groupId=${group.id}`}+ <Column+ width="10%"+ className="px-4"+ align="right"+ valign="middle">- View- </Link>- </Column>- </Row>- </Column>- </Row>- ))}+ <Link+ className="rounded-lg border border-solid border-neutral-300 bg-white px-2.5 py-1.5 text-sm font-medium text-neutral-700 no-underline"+ href={`https://app.dub.co/${workspace.slug}/program/fraud?groupId=${group.id}`}+ >+ View+ </Link>+ </Column>+ </Row>+ </Column>+ </Row>+ );+ })}{remainingCount > 0 && (<Row className="h-11 rounded-b-xl border-t border-solid border-neutral-200 bg-neutral-50">diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 69b1dbe2ad..68c2d93d07 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -532,6 +532,9 @@ importers:'@react-email/markdown':specifier: ^0.0.17version: 0.0.17([email protected])+ '@react-email/preview-server':+ specifier: 5.1.0+ version: 5.1.0(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])'@react-email/render':specifier: ^2.0.0@@ -2980,54 +2983,105 @@ packages:'@next/[email protected]':resolution: {integrity: sha512-ejZHa3ogTxcy851dFoNtfB5B2h7AbSAtHbR5CymUlnz4yW1QjHNufVpvTu8PTnWBKFKjrd4k6Gbi2SsCiJKvxw==}+ '@next/[email protected]':+ resolution: {integrity: sha512-8tuaQkyDVgeONQ1MeT9Mkk8pQmZapMKFh5B+OrFUlG3rVmYTXcXlBetBgTurKXGaIZvkoqRT9JL5K3phXcgang==}+'@next/[email protected]':resolution: {integrity: sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw==}engines: {node: '>= 10'}cpu: [arm64]os: [darwin]+ '@next/[email protected]':+ resolution: {integrity: sha512-4XgdKtdVsaflErz+B5XeG0T5PeXKDdruDf3CRpnhN+8UebNa5N2H58+3GDgpn/9GBurrQ1uWW768FfscwYkJRg==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [darwin]+'@next/[email protected]':resolution: {integrity: sha512-UP6CaDBcqaCBuiq/gfCEJw7sPEoX1aIjZHnBWN9v9qYHQdMKvCKcAVs4OX1vIjeE+tC5EIuwDTVIoXpUes29lg==}engines: {node: '>= 10'}cpu: [x64]os: [darwin]+ '@next/[email protected]':+ resolution: {integrity: sha512-spbEObMvRKkQ3CkYVOME+ocPDFo5UqHb8EMTS78/0mQ+O1nqE8toHJVioZo4TvebATxgA8XMTHHrScPrn68OGw==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [darwin]+'@next/[email protected]':resolution: {integrity: sha512-NCslw3GrNIw7OgmRBxHtdWFQYhexoUCq+0oS2ccjyYLtcn1SzGzeM54jpTFonIMUjNbHmpKpziXnpxhSWLcmBA==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ '@next/[email protected]':+ resolution: {integrity: sha512-uQtWE3X0iGB8apTIskOMi2w/MKONrPOUCi5yLO+v3O8Mb5c7K4Q5KD1jvTpTF5gJKa3VH/ijKjKUq9O9UhwOYw==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [linux]+'@next/[email protected]':resolution: {integrity: sha512-nfymt+SE5cvtTrG9u1wdoxBr9bVB7mtKTcj0ltRn6gkP/2Nu1zM5ei8rwP9qKQP0Y//umK+TtkKgNtfboBxRrw==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ '@next/[email protected]':+ resolution: {integrity: sha512-llA+hiDTrYvyWI21Z0L1GiXwjQaanPVQQwru5peOgtooeJ8qx3tlqRV2P7uH2pKQaUfHxI/WVarvI5oYgGxaTw==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [linux]+'@next/[email protected]':resolution: {integrity: sha512-hvXcZvCaaEbCZcVzcY7E1uXN9xWZfFvkNHwbe/n4OkRhFWrs1J1QV+4U1BN06tXLdaS4DazEGXwgqnu/VMcmqw==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ '@next/[email protected]':+ resolution: {integrity: sha512-AK2q5H0+a9nsXbeZ3FZdMtbtu9jxW4R/NgzZ6+lrTm3d6Zb7jYrWcgjcpM1k8uuqlSy4xIyPR2YiuUr+wXsavA==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [linux]+'@next/[email protected]':resolution: {integrity: sha512-4IUO539b8FmF0odY6/SqANJdgwn1xs1GkPO5doZugwZ3ETF6JUdckk7RGmsfSf7ws8Qb2YB5It33mvNL/0acqA==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ '@next/[email protected]':+ resolution: {integrity: sha512-1TDG9PDKivNw5550S111gsO4RGennLVl9cipPhtkXIFVwo31YZ73nEbLjNC8qG3SgTz/QZyYyaFYMeY4BKZR/g==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [linux]+'@next/[email protected]':resolution: {integrity: sha512-CpJVTkYI3ZajQkC5vajM7/ApKJUOlm6uP4BknM3XKvJ7VXAvCqSjSLmM0LKdYzn6nBJVSjdclx8nYJSa3xlTgQ==}engines: {node: '>= 10'}cpu: [arm64]os: [win32]+ '@next/[email protected]':+ resolution: {integrity: sha512-aEZIS4Hh32xdJQbHz121pyuVZniSNoqDVx1yIr2hy+ZwJGipeqnMZBJHyMxv2tiuAXGx6/xpTcQJ6btIiBjgmg==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [win32]+'@next/[email protected]':resolution: {integrity: sha512-gMzgBX164I6DN+9/PGA+9dQiwmTkE4TloBNx8Kv9UiGARsr9Nba7IpcBRA1iTV9vwlYnrE3Uy6I7Aj6qLjQuqw==}engines: {node: '>= 10'}cpu: [x64]os: [win32]+ '@next/[email protected]':+ resolution: {integrity: sha512-E+njfCoFLb01RAFEnGZn6ERoOqhK1Gl3Lfz1Kjnj0Ulfu7oJbuMyvBKNj/bw8XZnenHDASlygTjZICQW+rYW1Q==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [win32]+'@nodelib/[email protected]':resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}engines: {node: '>= 8'}@@ -4175,6 +4229,9 @@ packages:peerDependencies:react: ^18.0 || ^19.0 || ^19.0.0-rc+ '@react-email/[email protected]':+ resolution: {integrity: sha512-mNqeCjXkU9NdVCtgQnj4l7w426G8xyFH4hejgrWa7wVaIUyVUwh9h9TqlPw9j4aisoBwnOYghbV987ejXd0i4w==}+'@react-email/[email protected]':resolution: {integrity: sha512-F7j9FJ0JN/A4d7yr+aw28p4uX7VLWs7hTHtLo7WRyw4G+Lit6Zucq4UWKRxJC8lpsUdzVmG7aBJnKOT+urqs/w==}engines: {node: '>=18.0.0'}@@ -10205,6 +10262,27 @@ packages:sass:optional: true+ resolution: {integrity: sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA==}+ engines: {node: '>=20.9.0'}+ hasBin: true+ peerDependencies:+ '@opentelemetry/api': ^1.1.0+ '@playwright/test': ^1.51.1+ babel-plugin-react-compiler: '*'+ react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0+ react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0+ sass: ^1.3.0+ peerDependenciesMeta:+ '@opentelemetry/api':+ optional: true+ '@playwright/test':+ optional: true+ babel-plugin-react-compiler:+ optional: true+ sass:+ optional: true+resolution: {integrity: sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==}engines: {node: '>=10'}@@ -15875,30 +15953,56 @@ snapshots:'@next/[email protected]': {}+ '@next/[email protected]': {}+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@next/[email protected]':optional: true+ '@next/[email protected]':+ optional: true+'@nodelib/[email protected]':dependencies:'@nodelib/fs.stat': 2.0.5@@ -17305,6 +17409,19 @@ snapshots:marked: 15.0.12react: 19.1.3+ '@react-email/[email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ next: 16.0.10(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - '@opentelemetry/api'+ - '@playwright/test'+ - babel-plugin-macros+ - babel-plugin-react-compiler+ - react+ - react-dom+ - sass+'@react-email/[email protected]([email protected])':dependencies:react: 19.1.3@@ -24878,6 +24995,30 @@ snapshots:- '@babel/core'- babel-plugin-macros+ [email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]):+ dependencies:+ '@next/env': 16.0.10+ '@swc/helpers': 0.5.15+ caniuse-lite: 1.0.30001741+ postcss: 8.4.31+ react: 19.1.3+ react-dom: 19.1.3([email protected])+ styled-jsx: 5.1.6([email protected])+ optionalDependencies:+ '@next/swc-darwin-arm64': 16.0.10+ '@next/swc-darwin-x64': 16.0.10+ '@next/swc-linux-arm64-gnu': 16.0.10+ '@next/swc-linux-arm64-musl': 16.0.10+ '@next/swc-linux-x64-gnu': 16.0.10+ '@next/swc-linux-x64-musl': 16.0.10+ '@next/swc-win32-arm64-msvc': 16.0.10+ '@next/swc-win32-x64-msvc': 16.0.10+ '@opentelemetry/api': 1.9.0+ sharp: 0.34.4+ transitivePeerDependencies:+ - '@babel/core'+ - babel-plugin-macros+dependencies:semver: 7.7.2