The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
revert the integration flags changes
Kiran K2b3b02d61e06
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 1948789a4b..94274a4043 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,13 +1,21 @@"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 b418de147e..42235bf759 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,13 +1,10 @@"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>@@ -15,29 +12,26 @@ export default function PageHeader({ slug }: { slug: string }) {<h1 className="text-2xl font-semibold tracking-tight text-black">Integrations</h1>-- {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 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 9cfe94cf1d..a2bded53e7 100644--- a/apps/web/ui/layout/nav-tabs.tsx+++ b/apps/web/ui/layout/nav-tabs.tsx@@ -26,7 +26,9 @@ export default function NavTabs() {...(flags?.conversions? [{ name: "Events", href: `/${slug}/events` }]: []),- { name: "Integrations", href: `/${slug}/integrations` },+ ...(flags?.integrations+ ? [{ name: "Integrations", href: `/${slug}/integrations` }]+ : []),{ name: "Settings", href: `/${slug}/settings` },],[flags],