rewrite header view render logic