Files
TudorandClaude Opus 5 cef2f77149 feat(destinations): the After Year 11 section
Question cards over one bar, with the cards acting as a lens on the bar
rather than a summary beside it — focusing a card dims everything it is
not made of, so the grouping we chose is inspectable rather than asserted.

The bar renders only when canRenderBar allows it. Where a category is
withheld the section says so and shows the table instead: the categories
sum to the cohort, so a bar drawn from the published segments leaves a
gap whose width is the withheld figure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvdDKvFFSZuMVDH5fEyTob
2026-08-28 16:14:13 +01:00

39 lines
1.6 KiB
TypeScript

/**
* DestinationsSection — where a school's Year 11 leavers went. Server component.
*
* The headline is deliberately NOT the sustained-destination rate. That figure
* sits between 92% and 97% for nearly every school in England, so leading with
* it would say nothing; the mix is what actually varies between schools.
*
* The section dates its own cohort because destination measures are published
* about two GCSE years behind the results in the section above — undated, the
* figures read as stale rather than as a different question.
*/
import type { DestinationPhase } from '@/lib/types';
import { Section, sectionStyles } from './sectionShared';
import { DestinationsView } from './DestinationsView';
export function DestinationsSection({ destinations }: { destinations: DestinationPhase }) {
const all = destinations.groups.all;
const hasContent = Object.values(destinations.groups)
.some(group => (group?.categories?.length ?? 0) > 0);
if (!hasContent) return null;
const cohort = all?.cohort ?? null;
const year = destinations.cohort_year;
return (
<Section id="destinations">
<h2 className={sectionStyles.sectionTitle}>After Year 11</h2>
<p className={sectionStyles.sectionSubtitle}>
Where {cohort ? `the ${cohort} pupils` : 'the pupils'} who left Year 11
{year ? ` in ${year}` : ''} were during the following year. The Department
for Education tracks leavers for two terms, so these figures cover an
earlier year group than the GCSE results above.
</p>
<DestinationsView destinations={destinations} phase="ks4" />
</Section>
);
}