diff --git a/app/views/components/work.hbs b/app/views/components/work.hbs
index 80c0eb1..68c02a5 100644
--- a/app/views/components/work.hbs
+++ b/app/views/components/work.hbs
@@ -2,9 +2,13 @@
{{> title value="Experience"}}
- {{#each resume.work}}
+ {{#each (filterRepeatKey resume.work "company")}}
+ {{#if repeated}}
+ {{> section-header name="" }}
+ {{else}}
{{> section-header name=this.company }}
+ {{/if}}
{{#if position}}
{{position}}
diff --git a/index.js b/index.js
index e4a4a80..27e7d77 100644
--- a/index.js
+++ b/index.js
@@ -40,6 +40,15 @@ handlebars.registerHelper({
formatDate: function (date) {
return moment(date).format('MM/YYYY');
+ },
+
+ filterRepeatKey: function(list, key) {
+ return list.map((curr, i, array) => {
+ if (curr[key] == array[i-1]?.[key]) {
+ curr.repeated = true
+ }
+ return curr
+ })
}
});