feat(home): fetch national averages, wire to SchoolRow and CompactSchoolItem
- Add nationalAvgRwm state fetched from /api/national-averages on mount - Pass nationalAvgRwm to SchoolRow (vs-national delta now active in list view) - Pass nationalAvgRwm to SchoolMap (prop accepted, threaded to Task 7) - Redesign CompactSchoolItem: Ofsted badge + single headline metric + delta - Fix stray backslash in SchoolRow.module.css .vsNationalFlat selector Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,9 +27,10 @@ interface SchoolMapProps {
|
||||
zoom?: number;
|
||||
referencePoint?: [number, number];
|
||||
onMarkerClick?: (school: School) => void;
|
||||
nationalAvgRwm?: number | null;
|
||||
}
|
||||
|
||||
export function SchoolMap({ schools, center, zoom = 13, referencePoint, onMarkerClick }: SchoolMapProps) {
|
||||
export function SchoolMap({ schools, center, zoom = 13, referencePoint, onMarkerClick, nationalAvgRwm }: SchoolMapProps) {
|
||||
const wrapperRef = useRef<HTMLDivElement>(null);
|
||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user