The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
TS fix
Kiran K9da863764eeb
diff --git a/apps/web/app/app.dub.co/embed/utils.ts b/apps/web/app/app.dub.co/embed/utils.tsindex 2468bbfd71..b555fd02b5 100644--- a/apps/web/app/app.dub.co/embed/utils.ts+++ b/apps/web/app/app.dub.co/embed/utils.ts@@ -30,6 +30,10 @@ export const getLinkAndProgram = async (linkToken: string) => {const { program, ...link } = linkAndProgram;+ if (!program) {+ notFound();+ }+return {program,link,diff --git a/apps/web/lib/fetchers/get-content-api.ts b/apps/web/lib/fetchers/get-content-api.tsindex 6c8c66e001..d0649af38f 100644--- a/apps/web/lib/fetchers/get-content-api.ts+++ b/apps/web/lib/fetchers/get-content-api.ts@@ -1,9 +1,5 @@import { cache } from "react";export const getContentAPI = cache(async () => {- return await fetch("https://dub.co/api/content", {- next: {- revalidate: 60 * 60 * 24, // cache for 24 hours- },- }).then((res) => res.json());+ return []});diff --git a/apps/web/ui/layout/toolbar/toolbar.tsx b/apps/web/ui/layout/toolbar/toolbar.tsxindex adf1de563c..23d697857d 100644--- a/apps/web/ui/layout/toolbar/toolbar.tsx+++ b/apps/web/ui/layout/toolbar/toolbar.tsx@@ -19,14 +19,10 @@ export default function Toolbar(props: ToolbarProps) {}async function ToolbarRSC({ show = ["onboarding", "help"] }: ToolbarProps) {- const { popularHelpArticles, allHelpArticles } = await fetch(- "https://dub.co/api/content",- {- next: {- revalidate: 60 * 60 * 24, // cache for 24 hours- },- },- ).then((res) => res.json());+ const { popularHelpArticles, allHelpArticles } = {+ popularHelpArticles: [],+ allHelpArticles: [],+ };return (<div className="flex items-center gap-3">