I still think this can be merged with the `renderSummaryHeader` function