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.

more fixes

Steven Tey20b40ac3eec4
diff --git a/apps/web/app/api/user/referrals-token/route.ts b/apps/web/app/api/user/referrals-token/route.ts
index bc73b5bbcb..f50bc54b15 100644
--- a/apps/web/app/api/user/referrals-token/route.ts
+++ b/apps/web/app/api/user/referrals-token/route.ts
@@ -7,7 +7,7 @@ export const GET = withSession(async ({ session }) => {
programId: "prog_d8pl69xXCv4AoHNT281pHQdo",
tenantId: session.user.id,
partner: {
- name: session.user.name,
+ name: session.user.name || session.user.email,
email: session.user.email,
image: session.user.image || null,
tenantId: session.user.id,
diff --git a/apps/web/app/not-found-hint.tsx b/apps/web/app/not-found-hint.tsx
index 4f30536dd1..ca3956f0e0 100644
--- a/apps/web/app/not-found-hint.tsx
+++ b/apps/web/app/not-found-hint.tsx
@@ -2,6 +2,7 @@
import { Button } from "@dub/ui";
import { SessionProvider, signOut, useSession } from "next-auth/react";
+import Link from "next/link";
import { useState } from "react";
export function NotFoundHint() {
@@ -16,6 +17,14 @@ function NotFoundHintChild() {
const { data: session } = useSession();
const [isLoading, setIsLoading] = useState(false);
+ if (!session) {
+ return (
+ <Link href="/">
+ <Button text="Return home" />
+ </Link>
+ );
+ }
+
return (
<>
<div className="flex items-center gap-2 text-neutral-600">