import { Link } from 'react-router-dom' import { adjacentScreens, screenLabel } from '../../utils/matrixStory' import type { MatrixCtx } from './types' /** The app's decisions browse page (App.tsx `browse-topics`); it reads `?state=<2-letter code>` and is national without it. */ const DECISIONS_PATH = '/browse-topics' /** Where "See decisions" goes: the state in scope, or the national page. Exported for the tests. */ export function decisionsHref(stateCode: string | null): string { return stateCode ? `${DECISIONS_PATH}?${new URLSearchParams({ state: stateCode }).toString()}` : DECISIONS_PATH } /** * The last screen: large square buttons that carry the scope in view. Every destination is a route that * exists in App.tsx. The Table section's own CSV download is the third button. */ export default function ActionBlock({ ctx, onDownload }: { ctx: MatrixCtx; onDownload: () => void }) { const state = ctx.stateScope const { prev } = adjacentScreens('action') return (

Go further

Take it further

{ctx.metricLabel}, {ctx.vintage} ACS 5-year, {state ? state.name : 'all states and territories'}.

{prev && ( )}
) }