import { Suspense } from "hono/jsx/streaming"; import { getCodeActivity, type ActivitySeries, type CodeActivityData } from "../code-activity.ts"; import { getProfile } from "../data.ts"; import { PageNav } from "./page-nav.tsx"; function ActivityUnavailable({ source }: { source: string }) { return (

{source} activity is temporarily unavailable.

); } function CalendarGraph({ activity, source, noun, }: { activity: ActivitySeries; source: string; noun: string; }) { const firstDay = activity.days[0]?.date; const leadingDays = firstDay ? new Date(`${firstDay}T00:00:00Z`).getUTCDay() : 0; return (
); } // Layout-stable placeholder for a cold upstream pass. It reserves the same // rows the populated sections occupy so the page does not reflow when the // streamed content replaces it. It renders as inert text without JS. function ActivitySkeleton({ label }: { label: string }) { return (
); } function TangledSection({ activity }: { activity: CodeActivityData }) { return ( <> {activity.tangled ? ( ) : ( )} {activity.tangledPinned.length > 0 && (

Pinned repositories

Selected on Tangled

)} {activity.tangledRecent.length > 0 && (

Recent commits in pinned repositories

Public Tangled activity

    {activity.tangledRecent.map((commit) => (
  • {commit.subject} {commit.repository.split("/").at(-1)}
  • ))}
)} ); } async function TangledActivity() { const activity = await getCodeActivity(); return ( <> {activity.tangled && (

{activity.tangled.total.toLocaleString("en-US")} {" "}commits {activity.tangled.period}

)} ); } async function GithubActivity() { const activity = await getCodeActivity(); return ( <> {activity.github && (

{activity.github.total.toLocaleString("en-US")} {" "}contributions {activity.github.period}

)} {activity.github ? : } ); } async function CodeNavigation() { const profile = await getProfile(); return ; } export function CodeActivity() { return (
}>

Code

Public work across{" "} Tangled {" "} and{" "} GitHub .

Tangled

cameron.stream

}>

GitHub

@just-cameron

}>
); }