The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
more changes
Steven Tey6969a540faf3
diff --git a/apps/web/app/api/og/analytics/route.tsx b/apps/web/app/api/og/analytics/route.tsxindex 53c821e038..bb82bbe8bb 100644--- a/apps/web/app/api/og/analytics/route.tsx+++ b/apps/web/app/api/og/analytics/route.tsx@@ -27,7 +27,7 @@ export async function GET(req: NextRequest) {}const data = await getAnalytics({- // projectId can be undefined (for public links that haven't been claimed/synced to a project)+ // projectId can be undefined (for public links that haven't been claimed/synced to a workspace)...(link.projectId && { projectId: link.projectId }),linkId: link.id,endpoint: "timeseries",diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/analytics/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/analytics/page.tsxindex c90ed71088..5f1eb916ef 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/analytics/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/analytics/page.tsx@@ -3,7 +3,7 @@ import LayoutLoader from "@/ui/layout/layout-loader";import { Suspense } from "react";import AnalyticsClient from "./client";-export default function ProjectAnalytics() {+export default function WorkspaceAnalytics() {return (<Suspense fallback={<LayoutLoader />}><AnalyticsClient>diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsxindex a7ede367de..7787173cca 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx@@ -20,7 +20,7 @@ import Confetti from "react-dom-confetti";import { toast } from "sonner";import { mutate } from "swr";-export default function ProjectBillingClient() {+export default function WorkspaceBillingClient() {const router = useRouter();const searchParams = useSearchParams();diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page.tsxindex 068ddf5348..52c3f7f8c7 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page.tsx@@ -1,10 +1,10 @@import { Suspense } from "react";-import ProjectBillingClient from "./page-client";+import WorkspaceBillingClient from "./page-client";-export default function ProjectBilling() {+export default function WorkspaceBilling() {return (<Suspense>- <ProjectBillingClient />+ <WorkspaceBillingClient /></Suspense>);}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsxindex d2d0e05afa..c7ced18455 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx@@ -16,7 +16,7 @@ import { useState } from "react";const tabs: Array<"Members" | "Invitations"> = ["Members", "Invitations"];-export default function ProjectPeopleClient() {+export default function WorkspacePeopleClient() {const { setShowInviteTeammateModal, InviteTeammateModal } =useInviteTeammateModal();diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page.tsxindex e051f26854..560589bf1f 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page.tsx@@ -1,5 +1,5 @@-import ProjectPeopleClient from "./page-client";+import WorkspacePeopleClient from "./page-client";-export default function ProjectPeople() {- return <ProjectPeopleClient />;+export default function WorkspacePeople() {+ return <WorkspacePeopleClient />;}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsxindex 0eacaf86c3..3c16fc61b3 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx@@ -13,7 +13,7 @@ import { HOME_DOMAIN, SAML_PROVIDERS } from "@dub/utils";import { FolderSync, Lock, ShieldOff } from "lucide-react";import { useMemo, useState } from "react";-export default function ProjectSecurityClient() {+export default function WorkspaceSecurityClient() {return (<><SAMLSection />diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page.tsxindex 510943c0c6..7233186063 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page.tsx@@ -1,5 +1,5 @@-import ProjectSecurityClient from "./page-client";+import WorkspaceSecurityClient from "./page-client";-export default function ProjectSecurity() {- return <ProjectSecurityClient />;+export default function WorkspaceSecurity() {+ return <WorkspaceSecurityClient />;}diff --git a/apps/web/app/app.dub.co/(redirects)/analytics/page.tsx b/apps/web/app/app.dub.co/(redirects)/analytics/page.tsxindex fbdabca05e..85e2c8523b 100644--- a/apps/web/app/app.dub.co/(redirects)/analytics/page.tsx+++ b/apps/web/app/app.dub.co/(redirects)/analytics/page.tsx@@ -1,4 +1,4 @@-import { getProjects } from "@/lib/fetchers";+import { getWorkspaces } from "@/lib/fetchers";import { redirect } from "next/navigation";export default async function OldLinksAnalytics({@@ -6,7 +6,7 @@ export default async function OldLinksAnalytics({}: {searchParams: { [key: string]: string };}) {- const projects = await getProjects();+ const projects = await getWorkspaces();if (!projects || projects.length === 0) {redirect("/");}diff --git a/apps/web/app/app.dub.co/(redirects)/links/[key]/page.tsx b/apps/web/app/app.dub.co/(redirects)/links/[key]/page.tsxindex 104c8a5cc1..1a27630ac7 100644--- a/apps/web/app/app.dub.co/(redirects)/links/[key]/page.tsx+++ b/apps/web/app/app.dub.co/(redirects)/links/[key]/page.tsx@@ -1,4 +1,4 @@-import { getProjects } from "@/lib/fetchers";+import { getWorkspaces } from "@/lib/fetchers";import { redirect } from "next/navigation";export default async function OldLinksStatsPage({@@ -8,7 +8,7 @@ export default async function OldLinksStatsPage({key: string;};}) {- const projects = await getProjects();+ const projects = await getWorkspaces();if (!projects || projects.length === 0) {redirect("/");}diff --git a/apps/web/app/app.dub.co/(redirects)/links/page.tsx b/apps/web/app/app.dub.co/(redirects)/links/page.tsxindex 3182483e85..f9bd963fff 100644--- a/apps/web/app/app.dub.co/(redirects)/links/page.tsx+++ b/apps/web/app/app.dub.co/(redirects)/links/page.tsx@@ -1,8 +1,8 @@-import { getProjects } from "@/lib/fetchers";+import { getWorkspaces } from "@/lib/fetchers";import { redirect } from "next/navigation";export default async function OldLinksPage() {- const projects = await getProjects();+ const projects = await getWorkspaces();if (!projects || projects.length === 0) {redirect("/");}diff --git a/apps/web/app/app.dub.co/(redirects)/new/page.tsx b/apps/web/app/app.dub.co/(redirects)/new/page.tsxindex 5a6aa45997..3624dcc981 100644--- a/apps/web/app/app.dub.co/(redirects)/new/page.tsx+++ b/apps/web/app/app.dub.co/(redirects)/new/page.tsx@@ -1,8 +1,8 @@-import { getProjects } from "@/lib/fetchers";+import { getWorkspaces } from "@/lib/fetchers";import { redirect } from "next/navigation";export default async function NewLinkPage() {- const projects = await getProjects();+ const projects = await getWorkspaces();if (!projects || projects.length === 0) {redirect("/?newProject=true");}diff --git a/apps/web/lib/fetchers.ts b/apps/web/lib/fetchers.tsindex cb7512932f..e4757f4226 100644--- a/apps/web/lib/fetchers.ts+++ b/apps/web/lib/fetchers.ts@@ -2,12 +2,12 @@ import { cache } from "react";import { getSession } from "./auth";import prisma from "./prisma";-export const getProjects = cache(async () => {+export const getWorkspaces = cache(async () => {const session = await getSession();if (!session) {return null;}- const projects = await prisma.project.findMany({+ const workspaces = await prisma.project.findMany({where: {users: {some: {@@ -21,10 +21,10 @@ export const getProjects = cache(async () => {},});- return projects;+ return workspaces;});-export const getProject = cache(async ({ slug }: { slug: string }) => {+export const getWorkspace = cache(async ({ slug }: { slug: string }) => {const session = await getSession();if (!session) {return null;