mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
9acfa852b2
## Summary Three small docs polishes: - **Hide the disgusting "Ask AI" side tab.** The Decimal widget renders its own `.decimal-widget-sidebar-tab` launcher (vertical pill with sideways text) on every page. We already trigger the widget from our own "Ask AI" button in the nav, so the third-party launcher is redundant *and* ugly. Hidden via CSS in `app/global.css`. - **Fix the Playground nav link.** It pointed at `platform.composio.dev/auth?next_page=/tool-router` — which (a) hits a dead host now that platform has moved to `dashboard.composio.dev`, and (b) lost the playground's connect check on the redirect. Repointed to `https://dashboard.composio.dev/~/project/playground`, which is the dashboard's smart-resolver route: it handles login (`?next=`), looks up `last_visited` / default org+project, and lands the user on `/{org}/{project}/playground` with the connect step intact. Same fix applied to the toolkits landing CTA and the welcome-page Playground card. - **Trim the welcome page.** Dropped the duplicated intro Cards row, the "Get Started" / "Explore" / "Features" / "Community" headers, and the secondary Features grid. Now it's: intro → AIToolsBanner → Quickstart → Toolkits + Playground → Providers. Much cleaner. ## Test plan - [ ] `bun run scripts/validate-links.ts` passes (already verified locally — 0 errors) - [ ] On preview deploy, the side "Ask AI" tab is gone - [ ] Clicking "Playground" in the nav (logged out) lands on login → playground; (logged in) lands on `/{org}/{project}/playground` - [ ] Welcome page renders without missing-icon errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
83 lines
2.4 KiB
TypeScript
83 lines
2.4 KiB
TypeScript
'use client';
|
|
|
|
import Link from 'next/link';
|
|
import Image from 'next/image';
|
|
import type { ReactNode } from 'react';
|
|
|
|
interface ProviderCardProps {
|
|
name: string;
|
|
href: string;
|
|
logo?: string;
|
|
logoDark?: string;
|
|
icon?: ReactNode;
|
|
languages?: ('Python' | 'TypeScript')[];
|
|
}
|
|
|
|
export function ProviderCard({ name, href, logo, logoDark, icon, languages }: ProviderCardProps) {
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className="flex items-center gap-5 rounded-lg border border-fd-border bg-fd-card p-5 transition-all hover:bg-fd-accent/50 hover:border-[color-mix(in_srgb,var(--composio-orange)_50%,transparent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
|
>
|
|
<div className="flex h-12 w-12 shrink-0 items-center justify-center">
|
|
{logo && logoDark ? (
|
|
<>
|
|
<Image
|
|
src={logo}
|
|
alt={`${name} logo`}
|
|
width={48}
|
|
height={48}
|
|
className="h-10 w-auto dark:hidden"
|
|
/>
|
|
<Image
|
|
src={logoDark}
|
|
alt={`${name} logo`}
|
|
width={48}
|
|
height={48}
|
|
className="h-10 w-auto hidden dark:block"
|
|
/>
|
|
</>
|
|
) : logo ? (
|
|
<Image
|
|
src={logo}
|
|
alt={`${name} logo`}
|
|
width={48}
|
|
height={48}
|
|
className="h-10 w-auto"
|
|
/>
|
|
) : icon ? (
|
|
<span className="text-fd-muted-foreground">{icon}</span>
|
|
) : (
|
|
<span className="text-2xl font-bold text-fd-muted-foreground/40">
|
|
{name.charAt(0)}
|
|
</span>
|
|
)}
|
|
</div>
|
|
|
|
<div className="flex flex-col justify-center gap-2">
|
|
<span className="text-sm font-semibold text-fd-foreground">{name}</span>
|
|
{languages && languages.length > 0 && (
|
|
<div className="flex gap-2">
|
|
{languages.map((lang) => (
|
|
<span
|
|
key={lang}
|
|
className="rounded border border-fd-border bg-fd-muted/50 px-2 py-0.5 text-xs text-fd-muted-foreground"
|
|
>
|
|
{lang}
|
|
</span>
|
|
))}
|
|
</div>
|
|
)}
|
|
</div>
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
export function ProviderGrid({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<div className="not-prose grid grid-cols-1 gap-3 sm:grid-cols-2">
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|