Skip to content

Commit

Permalink
fix: format of icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eveeifyeve committed Jan 4, 2025
1 parent 6fe42bc commit e681826
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/pages/api/skillIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ import json from "../../data/skills.json";

export async function GET() {
try {
const response = json;
const skills: Set<string> = new Set();

Object.entries(response).forEach(([_, categoryData]) => {
Object.values(categoryData).forEach(item => {
const skillIcon = (item)?.skillIcon ?? '';
skills.add(skillIcon);
});
});
const skills: Array<string> = [];
json.languages.forEach(item => skills.push(item.skillIcon))
json.tools.forEach(item => skills.push(item.skillIcon))
json.database.forEach(item => skills.push(item.skillIcon))
json.other.forEach(item => skills.push(item.skillIcon))

const combinedSkills: string[] = Array.from(skills).sort();

Expand Down

0 comments on commit e681826

Please sign in to comment.