We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 065c3a0 commit b4bec16Copy full SHA for b4bec16
webpack/js/hydration.js
@@ -1,10 +1,13 @@
1
export const hydrateAppWithData = (skills, labels) => {
2
- skills = Array.from( // Convert back into an array
3
- new Set( // Remove duplicates
4
- Object.values(skills)
5
- .flat() // Combine all skills
6
- .map(skill => skill.split('/')[0]) // Keep only the prefix
7
- )
+ skills = Array.from(
+ new Set( // Remove duplicates
+ Object.values(skills).flat() // Combine all skills
+ )
+ const top_level_skills = Array.from(
8
9
+ skills.map(skill => skill.split('/')[0]) // Keep only the prefix
10
11
)
12
13
const categories = {}
@@ -35,5 +38,5 @@ export const hydrateAppWithData = (skills, labels) => {
35
38
categories[name] = 'skill'
36
39
})
37
40
- return [skills, categories]
41
+ return [top_level_skills, categories]
42
}
0 commit comments