Skip to content

Commit

Permalink
Use SVGs instead of emoji for the categories, making them consistent …
Browse files Browse the repository at this point in the history
…over OSes
  • Loading branch information
Flaburgan authored Feb 26, 2025
1 parent 085d84e commit b414270
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion components/categories-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function CategoriesSelector({setSelectedItems, setCategoriesMode}
<div key={id} className={selectedCategories[id] ? classNames(styles.selected) : ""} onClick={() => updateCategories(id)}>
<div>
<h3>{category.name[locale]}</h3>
<p>{category.emoji}</p>
<img src={`./images/ademe/${category.slug}.svg`} />
</div>
</div>
);
Expand Down
10 changes: 0 additions & 10 deletions data/ademe/0-categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"en": "Digital",
"fr": "Numérique"
},
"emoji": "💻",
"slug": "numerique",
"color": "#28c"
},
Expand All @@ -16,7 +15,6 @@
"en": "Food",
"fr": "Alimentation"
},
"emoji": "🍽",
"slug": "alimentation",
"color": "#acf"
},
Expand All @@ -26,7 +24,6 @@
"en": "Drink",
"fr": "Boisson"
},
"emoji": "🍹",
"slug": "boisson",
"color": "#d04"
},
Expand All @@ -36,7 +33,6 @@
"en": "Transport",
"fr": "Transport"
},
"emoji": "🚴‍♂️",
"slug": "transport",
"color": "#981b5e"
},
Expand All @@ -46,7 +42,6 @@
"en": "Clothing",
"fr": "Habillement"
},
"emoji": "👔",
"slug": "habillement",
"color": "#b0b"
},
Expand All @@ -56,7 +51,6 @@
"en": "Home Appliance",
"fr": "Électroménager"
},
"emoji": "🛁",
"slug": "electromenager",
"color": "#aab"
},
Expand All @@ -66,7 +60,6 @@
"en": "Furniture",
"fr": "Mobilier"
},
"emoji": "🪑",
"slug": "mobilier",
"color": "#d74"
},
Expand All @@ -76,7 +69,6 @@
"en": "Heating",
"fr": "Chauffage"
},
"emoji": "🏠",
"slug": "chauffage",
"color": "#4b1"
},
Expand All @@ -86,7 +78,6 @@
"en": "Fruits and Vegetables",
"fr": "Fruits et légumes"
},
"emoji": "🍅",
"slug": "fruitsetlegumes",
"color": "#d26"
},
Expand All @@ -96,7 +87,6 @@
"en": "Digital Use",
"fr": "Usage numérique"
},
"emoji": "✉️",
"slug": "usagenumerique",
"color": "#d26"
}
Expand Down
5 changes: 2 additions & 3 deletions styles/categories-selector.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
margin-top: 0;
margin-bottom: .5rem;
}
p {
margin: 0;
font-size: 2rem;
img {
height: 50px;
}
}

Expand Down
1 change: 0 additions & 1 deletion types/AdemeECV.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export interface AdemeCategory {
en: string;
fr: string;
};
emoji: string;
slug: string;
color: string;
}
Expand Down

0 comments on commit b414270

Please sign in to comment.