Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

some small fixes

Steven Tey71a270c0359f
diff --git a/components/home/hero.tsx b/components/home/hero.tsx
index 79aeb1464e..4d1493cd5b 100644
--- a/components/home/hero.tsx
+++ b/components/home/hero.tsx
@@ -5,7 +5,7 @@ const Hero = () => {
return (
<div className="max-w-md sm:max-w-lg mt-20 mb-10 text-center mx-auto sm:px-0 px-2.5">
<a
- href="https://dub.sh/twitter"
+ href="https://dub.sh/launch"
target="_blank"
rel="noreferrer"
className="bg-blue-100 hover:bg-blue-200 flex justify-center items-center space-x-2 max-w-fit px-7 py-2 mx-auto rounded-full overflow-hidden transition-all"
diff --git a/lib/middleware/link.ts b/lib/middleware/link.ts
index e06d6eb10a..fca5a01714 100644
--- a/lib/middleware/link.ts
+++ b/lib/middleware/link.ts
@@ -23,6 +23,7 @@ export default async function LinkMiddleware(
if (target) {
const isBot = detectBot(req);
+ // special case for link health monitoring with planetfall.io :)
const noTrack = req.headers.get("dub-no-track");
if (!noTrack) ev.waitUntil(recordClick(hostname, req, key)); // track the click only if there is no `dub-no-track` header
diff --git a/package.json b/package.json
index b1b2819810..51643ca769 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"framer-motion": "^7.2.1",
"html-escaper": "^3.0.3",
"i": "^0.3.7",
- "mailing": "^0.8.2",
+ "mailing": "^0.8.3-next.0",
"mailing-core": "^0.8.2",
"ms": "^2.1.3",
"next": "^12.2.6-canary.8",
diff --git a/pages/api/auth/[...nextauth].tsx b/pages/api/auth/[...nextauth].tsx
index b38f5336af..28a04e7294 100644
--- a/pages/api/auth/[...nextauth].tsx
+++ b/pages/api/auth/[...nextauth].tsx
@@ -49,12 +49,18 @@ export const authOptions: NextAuthOptions = {
async signIn(message) {
if (message.isNewUser) {
const email = message.user.email;
- sendMarketingMail({
- subject: "✨ Welcome to Dub",
- to: email,
- bcc: process.env.TRUSTPILOT_BCC_EMAIL,
- component: <WelcomeEmail />,
- });
+ await Promise.all([
+ sendMarketingMail({
+ subject: "✨ Welcome to Dub",
+ to: email,
+ bcc: process.env.TRUSTPILOT_BCC_EMAIL,
+ component: <WelcomeEmail />,
+ }),
+ prisma.user.update({
+ where: { email },
+ data: { billingCycleStart: new Date().getDate() },
+ }),
+ ]);
}
},
},
diff --git a/yarn.lock b/yarn.lock
index 87f0b23b99..5ca0586b77 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3453,10 +3453,23 @@ mailing-core@^0.8.2:
open "^8.4.0"
posthog-node "^2.0.2"
-mailing@^0.8.2:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/mailing/-/mailing-0.8.2.tgz#59abf5038fc617b911cf970e0591469475d2f42a"
- integrity sha512-nZYXu86icolB3lm3wi8vziD7aOWM94HncCNFe7HryKbexVY490IuoPLuFzKNdH58Rj+Bcb+xKzaRmXkRjYz9dw==
+mailing-core@^0.8.3-next.0:
+ version "0.8.3-next.0"
+ resolved "https://registry.yarnpkg.com/mailing-core/-/mailing-core-0.8.3-next.0.tgz#9bb814220330a56d9bb30d094dff916b7fd99a06"
+ integrity sha512-JruWaCLegUptDpXKZP4gS91J94JqgI6Dklzs31r5Uryz//83OqN/m8ZPtJ14IseI6AhlkQ+pcZFrH0nk2QyQIg==
+ dependencies:
+ chalk "^4.1.2"
+ fs-extra "^10.1.0"
+ mjml "^4.12.0"
+ mjml-react "^2.0.7"
+ node-fetch "^2.6.7"
+ open "^8.4.0"
+ posthog-node "^2.0.2"
+
+mailing@^0.8.3-next.0:
+ version "0.8.3-next.0"
+ resolved "https://registry.yarnpkg.com/mailing/-/mailing-0.8.3-next.0.tgz#080e9c88e25f9a3d7eef38a474cb1918edf1b538"
+ integrity sha512-N7rUYWw7kIpKA/+bx0Z2HpPNAEE5U/hWdfqEFPYCCpVyF52fvpdqCx/hkQmUS4O55f4OgGJOoXF89ZvDKLOkcg==
dependencies:
"@babel/parser" "^7.18.11"
"@reecelucas/react-use-hotkeys" "^1.3.5"
@@ -3485,7 +3498,7 @@ mailing@^0.8.2:
html-minifier-terser "^7.0.0"
jsdom "^20.0.0"
lodash "^4.17.21"
- mailing-core "^0.8.2"
+ mailing-core "^0.8.3-next.0"
mjml "^4.12.0"
mjml-react "^2.0.7"
node-fetch "^2.6.7"