fix: remove size prop from Emoji component for consistency

- Eliminated the size prop from the Emoji component across various files to standardize rendering and improve code cleanliness.
This commit is contained in:
Julien Froidefond
2025-10-06 09:09:17 +02:00
parent cd35d67306
commit 8bb5495e13
26 changed files with 136 additions and 137 deletions

View File

@@ -47,24 +47,24 @@ export function ProductivityInsights({ data, className }: ProductivityInsightsPr
const getTrendIcon = () => {
switch (trend) {
case 'up': return { icon: <Emoji emoji="📈" size={24} />, color: 'text-green-600', label: 'En amélioration' };
case 'down': return { icon: <Emoji emoji="📉" size={24} />, color: 'text-red-600', label: 'En baisse' };
default: return { icon: <Emoji emoji="➡️" size={24} />, color: 'text-blue-600', label: 'Stable' };
case 'up': return { icon: <Emoji emoji="📈" />, color: 'text-green-600', label: 'En amélioration' };
case 'down': return { icon: <Emoji emoji="📉" />, color: 'text-red-600', label: 'En baisse' };
default: return { icon: <Emoji emoji="➡️" />, color: 'text-blue-600', label: 'Stable' };
}
};
const getConsistencyLevel = () => {
if (consistencyScore >= 80) return { label: 'Très régulier', color: 'text-green-600', icon: <Emoji emoji="🎯" size={24} /> };
if (consistencyScore >= 60) return { label: 'Assez régulier', color: 'text-blue-600', icon: <Emoji emoji="📊" size={24} /> };
if (consistencyScore >= 40) return { label: 'Variable', color: 'text-yellow-600', icon: <Emoji emoji="📊" size={24} /> };
return { label: 'Très variable', color: 'text-red-600', icon: <Emoji emoji="📊" size={24} /> };
if (consistencyScore >= 80) return { label: 'Très régulier', color: 'text-green-600', icon: <Emoji emoji="🎯" /> };
if (consistencyScore >= 60) return { label: 'Assez régulier', color: 'text-blue-600', icon: <Emoji emoji="📊" /> };
if (consistencyScore >= 40) return { label: 'Variable', color: 'text-yellow-600', icon: <Emoji emoji="📊" /> };
return { label: 'Très variable', color: 'text-red-600', icon: <Emoji emoji="📊" /> };
};
const getRatioStatus = () => {
if (creationRatio >= 100) return { label: 'Équilibré+', color: 'text-green-600', icon: <Emoji emoji="⚖️" size={24} /> };
if (creationRatio >= 80) return { label: 'Bien équilibré', color: 'text-blue-600', icon: <Emoji emoji="⚖️" size={24} /> };
if (creationRatio >= 60) return { label: 'Légèrement en retard', color: 'text-yellow-600', icon: <Emoji emoji="⚖️" size={24} /> };
return { label: 'Accumulation', color: 'text-red-600', icon: <Emoji emoji="⚖️" size={24} /> };
if (creationRatio >= 100) return { label: 'Équilibré+', color: 'text-green-600', icon: <Emoji emoji="⚖️" /> };
if (creationRatio >= 80) return { label: 'Bien équilibré', color: 'text-blue-600', icon: <Emoji emoji="⚖️" /> };
if (creationRatio >= 60) return { label: 'Légèrement en retard', color: 'text-yellow-600', icon: <Emoji emoji="⚖️" /> };
return { label: 'Accumulation', color: 'text-red-600', icon: <Emoji emoji="⚖️" /> };
};
const trendInfo = getTrendIcon();
@@ -80,7 +80,7 @@ export function ProductivityInsights({ data, className }: ProductivityInsightsPr
<div className="outline-card-green p-4">
<div className="flex items-center justify-between mb-2">
<h4 className="font-medium">
<Emoji emoji="🏆" size={16} /> Jour champion
<Emoji emoji="🏆" /> Jour champion
</h4>
<span className="text-2xl font-bold">
{mostProductiveDay.completed}
@@ -98,7 +98,7 @@ export function ProductivityInsights({ data, className }: ProductivityInsightsPr
<div className="outline-card-blue p-4">
<div className="flex items-center justify-between mb-2">
<h4 className="font-medium">
<Emoji emoji="💡" size={16} /> Jour créatif
<Emoji emoji="💡" /> Jour créatif
</h4>
<span className="text-2xl font-bold">
{mostCreativeDay.newTasks}
@@ -165,7 +165,7 @@ export function ProductivityInsights({ data, className }: ProductivityInsightsPr
{/* Recommandations */}
<div className="outline-card-yellow p-4">
<h4 className="font-medium mb-2 flex items-center gap-2">
<Emoji emoji="💡" size={16} /> Recommandations
<Emoji emoji="💡" /> Recommandations
</h4>
<div className="space-y-1 text-sm">
{trend === 'down' && (