The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update the integrations flags
Kiran K0ac6b4654196
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-client.tsxindex 94274a4043..1948789a4b 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-client.tsx@@ -1,21 +1,13 @@"use client";-import useWorkspace from "@/lib/swr/use-workspace";import { InstalledIntegrationProps } from "@/lib/types";import IntegrationCard from "@/ui/integrations/integration-card";-import { redirect } from "next/navigation";export default function IntegrationsPageClient({integrations,}: {integrations: InstalledIntegrationProps[];}) {- const { slug, flags } = useWorkspace();-- if (!flags?.integrations) {- redirect(`/${slug}`);- }-return (<div className="grid gap-4 sm:grid-cols-3">{integrations.map((integration) => (diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-header.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-header.tsxindex 42235bf759..b418de147e 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-header.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/integrations/page-header.tsx@@ -1,10 +1,13 @@"use client";+import useWorkspace from "@/lib/swr/use-workspace";import { buttonVariants, MaxWidthWrapper } from "@dub/ui";import { cn } from "@dub/utils";import Link from "next/link";export default function PageHeader({ slug }: { slug: string }) {+ const { flags } = useWorkspace();+return (<div className="flex h-36 w-full items-center border-b border-gray-200 bg-white"><MaxWidthWrapper>@@ -12,26 +15,29 @@ export default function PageHeader({ slug }: { slug: string }) {<h1 className="text-2xl font-semibold tracking-tight text-black">Integrations</h1>- <div className="flex gap-2">- <Link- href={`/${slug}/integrations/new`}- className={cn(- buttonVariants({ variant: "primary" }),- "flex h-10 items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm",- )}- >- Create Integration- </Link>- <Link- href={`/${slug}/integrations/manage`}- className={cn(- buttonVariants({ variant: "secondary" }),- "flex h-10 items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm",- )}- >- My Integrations- </Link>- </div>++ {flags?.integrations && (+ <div className="flex gap-2">+ <Link+ href={`/${slug}/integrations/new`}+ className={cn(+ buttonVariants({ variant: "primary" }),+ "flex h-10 items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm",+ )}+ >+ Create Integration+ </Link>+ <Link+ href={`/${slug}/integrations/manage`}+ className={cn(+ buttonVariants({ variant: "secondary" }),+ "flex h-10 items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm",+ )}+ >+ My Integrations+ </Link>+ </div>+ )}</div></MaxWidthWrapper></div>diff --git a/apps/web/ui/layout/nav-tabs.tsx b/apps/web/ui/layout/nav-tabs.tsxindex a2bded53e7..9cfe94cf1d 100644--- a/apps/web/ui/layout/nav-tabs.tsx+++ b/apps/web/ui/layout/nav-tabs.tsx@@ -26,9 +26,7 @@ export default function NavTabs() {...(flags?.conversions? [{ name: "Events", href: `/${slug}/events` }]: []),- ...(flags?.integrations- ? [{ name: "Integrations", href: `/${slug}/integrations` }]- : []),+ { name: "Integrations", href: `/${slug}/integrations` },{ name: "Settings", href: `/${slug}/settings` },],[flags],