38 lines
1.6 KiB
TypeScript
38 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>
|
||
|
|
);
|
||
|
|
}
|