diff --git a/website/app/(content)/platform/ecosystem/CommunityGrid.tsx b/website/app/(content)/platform/ecosystem/CommunityGrid.tsx index c733480055b..4cadb64eb64 100644 --- a/website/app/(content)/platform/ecosystem/CommunityGrid.tsx +++ b/website/app/(content)/platform/ecosystem/CommunityGrid.tsx @@ -1,9 +1,10 @@ import type { ReactNode } from "react"; +import { TOOLS } from "@/src/components/header/navData"; import { RevealOnScroll } from "@/src/components/RevealOnScroll"; import { SectionHeading } from "@/src/components/SectionHeading"; -import { GITHUB_REPO_URL, TOOLS } from "@/src/components/header/navData"; import { Card } from "@/src/design-system/Card"; +import { GITHUB_REPO_URL } from "@/src/helpers/github"; import { BlogIcon } from "@/src/icons/Blog"; import { GitHubIcon } from "@/src/icons/GitHub"; import { SlackIcon } from "@/src/icons/Slack"; @@ -58,10 +59,9 @@ const COMMUNITY_CARDS: readonly CommunityCardSpec[] = [ interface CommunityCardProps { readonly card: CommunityCardSpec; - readonly starCount: number | null; } -function CommunityCard({ card, starCount }: CommunityCardProps) { +function CommunityCard({ card }: CommunityCardProps) { const content = ( <>
@@ -73,7 +73,7 @@ function CommunityCard({ card, starCount }: CommunityCardProps) {

{card.body}

{card.withStars ? ( - + ) : ( {card.action} @@ -100,11 +100,7 @@ function CommunityCard({ card, starCount }: CommunityCardProps) { ); } -interface CommunityGridProps { - readonly starCount: number | null; -} - -export function CommunityGrid({ starCount }: CommunityGridProps) { +export function CommunityGrid() { return (
@@ -114,7 +110,7 @@ export function CommunityGrid({ starCount }: CommunityGridProps) { />
{COMMUNITY_CARDS.map((card) => ( - + ))}
diff --git a/website/app/(content)/platform/ecosystem/Hero.tsx b/website/app/(content)/platform/ecosystem/Hero.tsx index a14d4e90a28..6603c349661 100644 --- a/website/app/(content)/platform/ecosystem/Hero.tsx +++ b/website/app/(content)/platform/ecosystem/Hero.tsx @@ -2,25 +2,23 @@ import Link from "next/link"; import type { CSSProperties, ReactNode } from "react"; import { ButtonRow } from "@/src/components/ButtonRow"; -import { - GITHUB_REPO_URL, - GITHUB_STARGAZERS_URL, - TOOLS, -} from "@/src/components/header/navData"; +import { TOOLS } from "@/src/components/header/navData"; import { OutlineButton, SolidButton } from "@/src/design-system/Button"; +import { GITHUB_REPO_URL, GITHUB_STARGAZERS_URL } from "@/src/helpers/github"; import type { GitHubContributor } from "@/src/helpers/githubContributors"; import { BlogIcon } from "@/src/icons/Blog"; import { GitHubIcon } from "@/src/icons/GitHub"; import { SlackIcon } from "@/src/icons/Slack"; import { CARD_FOCUS_CLASSES } from "./cardFocus"; -import { PILL_CLASSES, StarPillContent } from "./StarPill"; import { CONNECTORS, ORBIT_RINGS, connectorPath, polarPoint, } from "./orbitGeometry"; +import { PILL_CLASSES } from "./pillClasses"; +import { StarPillContent } from "./StarPill"; const RING_STROKE = "rgba(245,240,234,0.17)"; @@ -43,7 +41,7 @@ interface OrbitNodeSpec { readonly key: string; readonly angle: number; readonly radius: number; - readonly render: (starCount: number | null) => ReactNode; + readonly content: ReactNode; } const ORBIT_NODES: readonly OrbitNodeSpec[] = [ @@ -51,14 +49,14 @@ const ORBIT_NODES: readonly OrbitNodeSpec[] = [ key: "stars", angle: 197, radius: 680, - render: (starCount) => ( + content: ( - + ), }, @@ -66,7 +64,7 @@ const ORBIT_NODES: readonly OrbitNodeSpec[] = [ key: "license", angle: 343, radius: 680, - render: () => ( + content: ( ( + content: ( @@ -91,7 +89,7 @@ const ORBIT_NODES: readonly OrbitNodeSpec[] = [ key: "slack", angle: 25, radius: 680, - render: () => ( + content: ( @@ -101,7 +99,7 @@ const ORBIT_NODES: readonly OrbitNodeSpec[] = [ key: "blog", angle: 38, radius: 560, - render: () => ( + content: ( @@ -203,11 +201,10 @@ function SocialChip({ href, label, children }: SocialChipProps) { } interface MobileHeroLinksProps { - readonly starCount: number | null; readonly contributors: ReadonlyArray | null; } -function MobileHeroLinks({ starCount, contributors }: MobileHeroLinksProps) { +function MobileHeroLinks({ contributors }: MobileHeroLinksProps) { const linkClassName = `border-cc-card-border bg-cc-surface text-cc-ink-dim flex min-h-11 items-center justify-center gap-2 rounded-lg border px-3 font-mono text-[0.65rem] no-underline ${CARD_FOCUS_CLASSES}`; return (