feat(destinations): the post-16 section, replacing the placeholder
The 'Post-16 destination data coming soon' note is deleted rather than reworded: for a school with no sixth form the truthful statement is that the question does not apply, and a placeholder there implies something is missing. hasSixthForm and .sixthFormNote go with it — nothing else used them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BvdDKvFFSZuMVDH5fEyTob
This commit is contained in:
1 parent
cef2f77149
commit
2b4cf20d75
5 files changed
+94
-18
No files matched your search
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Post16DestinationsSection — where a school's Year 13 leavers went.
|
||||
* Server component.
|
||||
*
|
||||
* A separate publication, a separate cohort and a separate question from
|
||||
* After Year 11, so it is a separate section rather than a tab: a parent
|
||||
* choosing a secondary and a student choosing a sixth form are not the same
|
||||
* reader.
|
||||
*
|
||||
* Not rendered at all for a school without post-16 provision. A "no data"
|
||||
* placeholder there would imply something is missing, when the truthful
|
||||
* statement is that the question does not apply — which is why the old
|
||||
* "Post-16 destination data coming soon" note is gone rather than reworded.
|
||||
*/
|
||||
|
||||
import type { DestinationPhase } from '@/lib/types';
|
||||
import { Section, sectionStyles } from './sectionShared';
|
||||
import { DestinationsView } from './DestinationsView';
|
||||
|
||||
export function Post16DestinationsSection({
|
||||
destinations,
|
||||
}: { destinations: DestinationPhase }) {
|
||||
const hasContent = Object.values(destinations.groups)
|
||||
.some(group => (group?.categories?.length ?? 0) > 0);
|
||||
if (!hasContent) return null;
|
||||
|
||||
const cohort = destinations.groups.all?.cohort ?? null;
|
||||
const year = destinations.cohort_year;
|
||||
|
||||
return (
|
||||
<Section id="post16-destinations">
|
||||
<h2 className={sectionStyles.sectionTitle}>After the sixth form</h2>
|
||||
<p className={sectionStyles.sectionSubtitle}>
|
||||
Where {cohort ? `the ${cohort} students` : 'the students'} who finished
|
||||
Year 13{year ? ` in ${year}` : ''} went next.
|
||||
</p>
|
||||
<DestinationsView destinations={destinations} phase="ks5" />
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user