Open source alternative to Semrush and Ahrefs
TypeScript backlink-analysisgoogle-search-console-mcpkeyword-researchmcpseoseo-agentseo-auditseo-automationseo-skillsseo-toolssite-audit
fix(dashboard): hide GA4 connect card until OAuth app is approved (#463)
Ben Senescu16b6d38ea8ea
diff --git a/src/client/features/ai-mcp/AvailableTools.tsx b/src/client/features/ai-mcp/AvailableTools.tsxindex 31f4cfa2..97d6881c 100644--- a/src/client/features/ai-mcp/AvailableTools.tsx+++ b/src/client/features/ai-mcp/AvailableTools.tsx@@ -207,10 +207,18 @@ const toolCategories: ToolCategory[] = [},];+// Google hasn't approved the GA4 OAuth app yet, so connecting fails.+// Flip to false once the app is approved.+const GA4_TOOLS_HIDDEN = true;++const visibleCategories = GA4_TOOLS_HIDDEN+ ? toolCategories.filter((cat) => cat.label !== "Google Analytics")+ : toolCategories;+export function AvailableTools() {return (<div className="grid gap-x-8 gap-y-8 md:grid-cols-2">- {toolCategories.map((cat) => (+ {visibleCategories.map((cat) => (<div key={cat.label}><h3 className="text-xs font-semibold uppercase tracking-wide text-base-content/50">{cat.label}diff --git a/src/client/features/dashboard/DashboardPage.tsx b/src/client/features/dashboard/DashboardPage.tsxindex 598b0b92..de98772b 100644--- a/src/client/features/dashboard/DashboardPage.tsx+++ b/src/client/features/dashboard/DashboardPage.tsx@@ -27,6 +27,10 @@ import {import { setProjectDomain } from "@/serverFunctions/projects";import type { DashboardHeroStep } from "@/types/schemas/dashboard";+// Google hasn't approved the GA4 OAuth app yet, so connecting fails.+// Flip to false once the app is approved.+const GA4_CARD_HIDDEN = true;+const HERO_COPY: Record<DashboardHeroStep,{ title: string; body: string; cta: string }@@ -332,7 +336,8 @@ export function DashboardPage({ projectId }: { projectId: string }) {hasData: gscConnected,node: <GscCard projectId={projectId} connected={gscConnected} />,},- ...(ga4Connected || !activation.ga4.cardDismissedAt+ ...(!GA4_CARD_HIDDEN &&+ (ga4Connected || !activation.ga4.cardDismissedAt)? [{key: "ga4",