Skip to content

Commit 4ab3edc

Browse files
committed
Add email footer
1 parent f1bfc6b commit 4ab3edc

File tree

11 files changed

+129
-264
lines changed

11 files changed

+129
-264
lines changed

backend/api/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@compass/api",
33
"description": "Backend API endpoints",
4-
"version": "0.1.0",
4+
"version": "1.0.0",
55
"private": true,
66
"scripts": {
77
"watch:compile": "npx concurrently \"tsc -b --watch --preserveWatchOutput\" \"(cd ../../common && tsc-alias --watch)\" \"(cd ../shared && tsc-alias --watch)\" \"(cd ../email && tsc-alias --watch)\" \"tsc-alias --watch\"",
@@ -27,7 +27,7 @@
2727
"dependencies": {
2828
"@google-cloud/monitoring": "4.0.0",
2929
"@google-cloud/secret-manager": "4.2.1",
30-
"@react-email/components": "0.0.33",
30+
"@react-email/components": "0.5.3",
3131
"@supabase/supabase-js": "2.38.5",
3232
"@tiptap/core": "2.3.2",
3333
"@tiptap/extension-blockquote": "2.3.2",
@@ -41,6 +41,8 @@
4141
"@tiptap/pm": "2.3.2",
4242
"@tiptap/starter-kit": "2.3.2",
4343
"@tiptap/suggestion": "2.3.2",
44+
"@types/react": "18.2.0",
45+
"@types/react-dom": "18.2.0",
4446
"colors": "1.4.0",
4547
"cors": "2.8.5",
4648
"dayjs": "1.11.4",
@@ -51,8 +53,8 @@
5153
"lodash": "4.17.21",
5254
"pg-promise": "11.4.1",
5355
"posthog-node": "4.11.0",
54-
"react": "19.0.0",
55-
"react-dom": "19.0.0",
56+
"react": "18.2.0",
57+
"react-dom": "18.2.0",
5658
"react-email": "3.0.7",
5759
"resend": "4.1.2",
5860
"string-similarity": "4.0.4",

backend/email/emails/test.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
'use server'
22

3-
import { Head, Html, Preview, Tailwind, Text } from '@react-email/components'
4-
import React from 'react'
3+
import * as React from 'react'
4+
import { Html, Head, Preview, Tailwind, Text } from '@react-email/components'
55

6-
export const Test = (props: { name: string }) => {
7-
return (
8-
<Html>
9-
<Head />
10-
<Preview>Helloo {props.name}</Preview>
11-
<Tailwind>
12-
<Text className="text-xl text-blue-800">Hello {props.name}</Text>
13-
</Tailwind>
14-
</Html>
15-
)
16-
}
6+
export const Test = ({ name }: { name: string }) => (
7+
<Html>
8+
<Head />
9+
<Preview>Hello {name}</Preview>
10+
<Tailwind>
11+
<Text className="text-xl text-blue-800">Hello {name}</Text>
12+
</Tailwind>
13+
</Html>
14+
)
1715

1816
Test.PreviewProps = {
1917
name: 'Friend',

backend/email/emails/utils.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Link, Row, Section, Text} from "@react-email/components";
2-
import {TbBrandDiscord, TbBrandGithub, TbBrandPatreon, TbBrandPaypal} from "react-icons/tb";
2+
import {SocialIcon} from "web/components/user/social";
33

44
interface Props {
55
email?: string
@@ -17,17 +17,18 @@ export const Footer = ({
1717
Compass © {new Date().getFullYear()}
1818
</Text>
1919
<Row>
20+
<div></div>
2021
<Link href="https://github.com/CompassMeet/Compass">
21-
<TbBrandGithub size={36} color={'black'}/>
22+
<SocialIcon site={'github'} size={36} color={'black'} />
2223
</Link>
2324
<Link href="https://discord.gg/8Vd7jzqjun">
24-
<TbBrandDiscord size={36} color={'black'}/>
25+
<SocialIcon site={'discord'} size={36} color={'black'}/>
2526
</Link>
2627
<Link href="https://patreon.com/CompassMeet">
27-
<TbBrandPatreon size={36} color={'black'}/>
28+
<SocialIcon site={'patreon'} size={36} color={'black'}/>
2829
</Link>
2930
<Link href="https://www.paypal.com/paypalme/MartinBraquet">
30-
<TbBrandPaypal size={36} color={'black'}/>
31+
<SocialIcon site={'paypal'} size={36} color={'black'}/>
3132
</Link>
3233
</Row>
3334
<Text style={footerText}>

backend/email/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
{
22
"name": "react-email-starter",
3-
"version": "0.1.9",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "email dev",
77
"build": "tsc -b"
88
},
99
"dependencies": {
10-
"@react-email/components": "0.0.33",
11-
"react": "19.0.0",
12-
"react-dom": "19.0.0",
10+
"react": "18.2.0",
11+
"react-dom": "18.2.0",
1312
"react-email": "3.0.7",
13+
"@react-email/components": "^0.5.3",
14+
"@react-email/render": "^1.2.3",
1415
"react-icons": "5.5.0",
1516
"resend": "4.1.2"
1617
},
1718
"devDependencies": {
1819
"@types/html-to-text": "9.0.4",
1920
"@types/prismjs": "1.26.5",
20-
"@types/react": "19.0.10",
21-
"@types/react-dom": "19.0.4"
21+
"@types/react": "18.2.0",
22+
"@types/react-dom": "18.2.0"
2223
}
2324
}

backend/email/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"isolatedModules": false,
2121
"declaration": true,
2222
"jsx": "react-jsx",
23+
"jsxImportSource": "react",
24+
"types": ["react", "react-dom"],
2325
"paths": {
2426
"common/*": ["../../common/src/*", "../../../common/lib/*"],
2527
"shared/*": ["../shared/src/*", "../../shared/lib/*"],

backend/email/yarn.lock

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -488,149 +488,6 @@
488488
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
489489
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
490490

491-
"@react-email/[email protected]":
492-
version "0.0.11"
493-
resolved "https://registry.yarnpkg.com/@react-email/body/-/body-0.0.11.tgz#996bc8ab0038a3b183d086fc4b5c581764b36d32"
494-
integrity sha512-ZSD2SxVSgUjHGrB0Wi+4tu3MEpB4fYSbezsFNEJk2xCWDBkFiOeEsjTmR5dvi+CxTK691hQTQlHv0XWuP7ENTg==
495-
496-
"@react-email/[email protected]":
497-
version "0.0.19"
498-
resolved "https://registry.yarnpkg.com/@react-email/button/-/button-0.0.19.tgz#f7585fd560f59be661c6ccdc3211df8b17f9fc86"
499-
integrity sha512-HYHrhyVGt7rdM/ls6FuuD6XE7fa7bjZTJqB2byn6/oGsfiEZaogY77OtoLL/mrQHjHjZiJadtAMSik9XLcm7+A==
500-
501-
"@react-email/[email protected]":
502-
version "0.0.11"
503-
resolved "https://registry.yarnpkg.com/@react-email/code-block/-/code-block-0.0.11.tgz#20369e4ac25789345f13d3c97c92a37536e81201"
504-
integrity sha512-4D43p+LIMjDzm66gTDrZch0Flkip5je91mAT7iGs6+SbPyalHgIA+lFQoQwhz/VzHHLxuD0LV6gwmU/WUQ2WEg==
505-
dependencies:
506-
prismjs "1.29.0"
507-
508-
"@react-email/[email protected]":
509-
version "0.0.5"
510-
resolved "https://registry.yarnpkg.com/@react-email/code-inline/-/code-inline-0.0.5.tgz#1ca46f4d44207c3dcca3ce35210f643d811ee8e0"
511-
integrity sha512-MmAsOzdJpzsnY2cZoPHFPk6uDO/Ncpb4Kh1hAt9UZc1xOW3fIzpe1Pi9y9p6wwUmpaeeDalJxAxH6/fnTquinA==
512-
513-
"@react-email/[email protected]":
514-
version "0.0.13"
515-
resolved "https://registry.yarnpkg.com/@react-email/column/-/column-0.0.13.tgz#0aaa5d6abae1b590a0262bfbfd241344a2c60ad3"
516-
integrity sha512-Lqq17l7ShzJG/d3b1w/+lVO+gp2FM05ZUo/nW0rjxB8xBICXOVv6PqjDnn3FXKssvhO5qAV20lHM6S+spRhEwQ==
517-
518-
"@react-email/[email protected]":
519-
version "0.0.33"
520-
resolved "https://registry.yarnpkg.com/@react-email/components/-/components-0.0.33.tgz#ac641aa897c60bf38d559275e3b29e9dfa7867ce"
521-
integrity sha512-/GKdT3YijT1iEWPAXF644jr12w5xVgzUr0zlbZGt2KOkGeFHNZUCL5UtRopmnjrH/Fayf8Gjv6q/4E2cZgDtdQ==
522-
dependencies:
523-
"@react-email/body" "0.0.11"
524-
"@react-email/button" "0.0.19"
525-
"@react-email/code-block" "0.0.11"
526-
"@react-email/code-inline" "0.0.5"
527-
"@react-email/column" "0.0.13"
528-
"@react-email/container" "0.0.15"
529-
"@react-email/font" "0.0.9"
530-
"@react-email/head" "0.0.12"
531-
"@react-email/heading" "0.0.15"
532-
"@react-email/hr" "0.0.11"
533-
"@react-email/html" "0.0.11"
534-
"@react-email/img" "0.0.11"
535-
"@react-email/link" "0.0.12"
536-
"@react-email/markdown" "0.0.14"
537-
"@react-email/preview" "0.0.12"
538-
"@react-email/render" "1.0.5"
539-
"@react-email/row" "0.0.12"
540-
"@react-email/section" "0.0.16"
541-
"@react-email/tailwind" "1.0.4"
542-
"@react-email/text" "0.0.11"
543-
544-
"@react-email/[email protected]":
545-
version "0.0.15"
546-
resolved "https://registry.yarnpkg.com/@react-email/container/-/container-0.0.15.tgz#6a35f0792cfd4b1ec557c7d566cdc2ecbdeb6d01"
547-
integrity sha512-Qo2IQo0ru2kZq47REmHW3iXjAQaKu4tpeq/M8m1zHIVwKduL2vYOBQWbC2oDnMtWPmkBjej6XxgtZByxM6cCFg==
548-
549-
"@react-email/[email protected]":
550-
version "0.0.9"
551-
resolved "https://registry.yarnpkg.com/@react-email/font/-/font-0.0.9.tgz#fe2ae24c408fe605cb564f75ef00d826a3dbdd35"
552-
integrity sha512-4zjq23oT9APXkerqeslPH3OZWuh5X4crHK6nx82mVHV2SrLba8+8dPEnWbaACWTNjOCbcLIzaC9unk7Wq2MIXw==
553-
554-
"@react-email/[email protected]":
555-
version "0.0.12"
556-
resolved "https://registry.yarnpkg.com/@react-email/head/-/head-0.0.12.tgz#83c1beba4e0e5207aa6f7ae9601f8cbdbda23d13"
557-
integrity sha512-X2Ii6dDFMF+D4niNwMAHbTkeCjlYYnMsd7edXOsi0JByxt9wNyZ9EnhFiBoQdqkE+SMDcu8TlNNttMrf5sJeMA==
558-
559-
"@react-email/[email protected]":
560-
version "0.0.15"
561-
resolved "https://registry.yarnpkg.com/@react-email/heading/-/heading-0.0.15.tgz#c6dd807ae684cbc37402fdd23dbd5500e245b531"
562-
integrity sha512-xF2GqsvBrp/HbRHWEfOgSfRFX+Q8I5KBEIG5+Lv3Vb2R/NYr0s8A5JhHHGf2pWBMJdbP4B2WHgj/VUrhy8dkIg==
563-
564-
"@react-email/[email protected]":
565-
version "0.0.11"
566-
resolved "https://registry.yarnpkg.com/@react-email/hr/-/hr-0.0.11.tgz#bce7748f5c1b9558429e733e5a239b09d06b77db"
567-
integrity sha512-S1gZHVhwOsd1Iad5IFhpfICwNPMGPJidG/Uysy1AwmspyoAP5a4Iw3OWEpINFdgh9MHladbxcLKO2AJO+cA9Lw==
568-
569-
"@react-email/[email protected]":
570-
version "0.0.11"
571-
resolved "https://registry.yarnpkg.com/@react-email/html/-/html-0.0.11.tgz#10557538436cb098819b8c7a0d1da9ddd8aaf4d8"
572-
integrity sha512-qJhbOQy5VW5qzU74AimjAR9FRFQfrMa7dn4gkEXKMB/S9xZN8e1yC1uA9C15jkXI/PzmJ0muDIWmFwatm5/+VA==
573-
574-
"@react-email/[email protected]":
575-
version "0.0.11"
576-
resolved "https://registry.yarnpkg.com/@react-email/img/-/img-0.0.11.tgz#ee2c9d6b2c61e8e9537a00b6d5f3d51428410f85"
577-
integrity sha512-aGc8Y6U5C3igoMaqAJKsCpkbm1XjguQ09Acd+YcTKwjnC2+0w3yGUJkjWB2vTx4tN8dCqQCXO8FmdJpMfOA9EQ==
578-
579-
"@react-email/[email protected]":
580-
version "0.0.12"
581-
resolved "https://registry.yarnpkg.com/@react-email/link/-/link-0.0.12.tgz#3b65e50af546e2539d9bfbb8442c7bdad7007235"
582-
integrity sha512-vF+xxQk2fGS1CN7UPQDbzvcBGfffr+GjTPNiWM38fhBfsLv6A/YUfaqxWlmL7zLzVmo0K2cvvV9wxlSyNba1aQ==
583-
584-
"@react-email/[email protected]":
585-
version "0.0.14"
586-
resolved "https://registry.yarnpkg.com/@react-email/markdown/-/markdown-0.0.14.tgz#12ec4e48f2bdeea99065ad40708fd04529de510d"
587-
integrity sha512-5IsobCyPkb4XwnQO8uFfGcNOxnsg3311GRXhJ3uKv51P7Jxme4ycC/MITnwIZ10w2zx7HIyTiqVzTj4XbuIHbg==
588-
dependencies:
589-
md-to-react-email "5.0.5"
590-
591-
"@react-email/[email protected]":
592-
version "0.0.12"
593-
resolved "https://registry.yarnpkg.com/@react-email/preview/-/preview-0.0.12.tgz#5c1291d7e18d63991430e59da43dd9952d2d9988"
594-
integrity sha512-g/H5fa9PQPDK6WUEG7iTlC19sAktI23qyoiJtMLqQiXFCfWeQMhqjLGKeLSKkfzszqmfJCjZtpSiKtBoOdxp3Q==
595-
596-
"@react-email/[email protected]":
597-
version "1.0.1"
598-
resolved "https://registry.yarnpkg.com/@react-email/render/-/render-1.0.1.tgz#5a8897a2b87c1aa41ebe5dd36233bd8d983b801a"
599-
integrity sha512-W3gTrcmLOVYnG80QuUp22ReIT/xfLsVJ+n7ghSlG2BITB8evNABn1AO2rGQoXuK84zKtDAlxCdm3hRyIpZdGSA==
600-
dependencies:
601-
html-to-text "9.0.5"
602-
js-beautify "^1.14.11"
603-
react-promise-suspense "0.3.4"
604-
605-
"@react-email/[email protected]":
606-
version "1.0.5"
607-
resolved "https://registry.yarnpkg.com/@react-email/render/-/render-1.0.5.tgz#88285b9314b85d2bc102f5bf3e558be82b87bc18"
608-
integrity sha512-CA69HYXPk21HhtAXATIr+9JJwpDNmAFCvdMUjWmeoD1+KhJ9NAxusMRxKNeibdZdslmq3edaeOKGbdQ9qjK8LQ==
609-
dependencies:
610-
html-to-text "9.0.5"
611-
prettier "3.4.2"
612-
react-promise-suspense "0.3.4"
613-
614-
"@react-email/[email protected]":
615-
version "0.0.12"
616-
resolved "https://registry.yarnpkg.com/@react-email/row/-/row-0.0.12.tgz#c9d18f6d4b173e95787949909a48ad5a5633bbf2"
617-
integrity sha512-HkCdnEjvK3o+n0y0tZKXYhIXUNPDx+2vq1dJTmqappVHXS5tXS6W5JOPZr5j+eoZ8gY3PShI2LWj5rWF7ZEtIQ==
618-
619-
"@react-email/[email protected]":
620-
version "0.0.16"
621-
resolved "https://registry.yarnpkg.com/@react-email/section/-/section-0.0.16.tgz#34214e6367d8c1b725b38a8b89391cd38f076a81"
622-
integrity sha512-FjqF9xQ8FoeUZYKSdt8sMIKvoT9XF8BrzhT3xiFKdEMwYNbsDflcjfErJe3jb7Wj/es/lKTbV5QR1dnLzGpL3w==
623-
624-
"@react-email/[email protected]":
625-
version "1.0.4"
626-
resolved "https://registry.yarnpkg.com/@react-email/tailwind/-/tailwind-1.0.4.tgz#e2685cc16c87f63c30bb0b766fd494c0fc15b2da"
627-
integrity sha512-tJdcusncdqgvTUYZIuhNC6LYTfL9vNTSQpwWdTCQhQ1lsrNCEE4OKCSdzSV3S9F32pi0i0xQ+YPJHKIzGjdTSA==
628-
629-
"@react-email/[email protected]":
630-
version "0.0.11"
631-
resolved "https://registry.yarnpkg.com/@react-email/text/-/text-0.0.11.tgz#b0c24a9eba5f841fe8c4d303dc6f5c1a1095b5e3"
632-
integrity sha512-a7nl/2KLpRHOYx75YbYZpWspUbX1DFY7JIZbOv5x0QU8SvwDbJt+Hm01vG34PffFyYvHEXrc6Qnip2RTjljNjg==
633-
634491
"@selderee/plugin-htmlparser2@^0.11.0":
635492
version "0.11.0"
636493
resolved "https://registry.yarnpkg.com/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz#d5b5e29a7ba6d3958a1972c7be16f4b2c188c517"

common/src/socials.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ export const SITE_ORDER = [
55
'bluesky',
66
'mastodon',
77
'substack',
8-
// 'onlyfans',
8+
'paypal',
99
'instagram',
1010
'github',
1111
'linkedin',
1212
'facebook',
13+
'patreon',
1314
'spotify',
1415
] as const
1516

@@ -29,6 +30,8 @@ const stripper: { [key in Site]: (input: string) => string } = {
2930
.replace(/^@/, '')
3031
.replace(/\/$/, ''),
3132
discord: (s) => s,
33+
paypal: (s) => s,
34+
patreon: (s) => s,
3235
bluesky: (s) =>
3336
s
3437
.replace(/^(https?:\/\/)?(www\.)?bsky\.app\/profile\//, '')
@@ -83,6 +86,8 @@ const urler: { [key in Site]: (handle: string) => string } = {
8386
linkedin: (s) => `https://linkedin.com/in/${s}`,
8487
facebook: (s) => `https://facebook.com/${s}`,
8588
spotify: (s) => `https://open.spotify.com/user/${s}`,
89+
paypal: (s) => `https://paypal.com/user/${s}`,
90+
patreon: (s) => `https://patreon.com/user/${s}`,
8691
}
8792

8893
export const PLATFORM_LABELS: { [key in Site]: string } = {
@@ -98,4 +103,6 @@ export const PLATFORM_LABELS: { [key in Site]: string } = {
98103
linkedin: 'LinkedIn',
99104
facebook: 'Facebook',
100105
spotify: 'Spotify',
106+
paypal: 'Paypal',
107+
patreon: 'Patreon',
101108
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@
3434
"@tiptap/starter-kit": "2.3.2",
3535
"@tiptap/suggestion": "2.3.2",
3636
"colorette": "^2.0.20",
37+
"prismjs": "^1.30.0",
3738
"react-markdown": "*",
38-
"prismjs": "^1.30.0"
39+
"react-email": "3.0.7",
40+
"@react-email/components": "^0.5.3",
41+
"@react-email/render": "^1.2.3"
3942
},
4043
"devDependencies": {
4144
"@testing-library/jest-dom": "^6.6.4",

web/components/user/social.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
TbBrandInstagram,
1111
TbBrandLinkedin,
1212
TbBrandMastodon,
13-
// TbBrandOnlyfans,
13+
TbBrandPatreon,
14+
TbBrandPaypal,
1415
TbBrandSpotify,
1516
TbBrandX,
1617
} from 'react-icons/tb'
@@ -24,15 +25,21 @@ export const PLATFORM_ICONS: {
2425
bluesky: TbBrandBluesky,
2526
mastodon: TbBrandMastodon,
2627
substack: LuBookmark,
27-
// onlyfans: TbBrandOnlyfans,
2828
instagram: TbBrandInstagram,
2929
github: TbBrandGithub,
3030
linkedin: TbBrandLinkedin,
3131
facebook: TbBrandFacebook,
3232
spotify: TbBrandSpotify,
33+
patreon: TbBrandPatreon,
34+
paypal: TbBrandPaypal,
3335
}
3436

35-
export const SocialIcon = (props: { site: string; className?: string }) => {
37+
export const SocialIcon = (props: {
38+
site: string;
39+
className?: string;
40+
size?: number;
41+
color?: string;
42+
}) => {
3643
const { site, ...rest } = props
3744
const Icon = PLATFORM_ICONS[site as Site] || PLATFORM_ICONS.site
3845

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"serve": "next dev -p 3000",

0 commit comments

Comments
 (0)