Skip to content

Commit 373a13f

Browse files
committed
ui fix logos
1 parent 65adddd commit 373a13f

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

ui/litellm-dashboard/src/components/team/LoggingSettings.tsx

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,18 @@ const LoggingSettings: React.FC<LoggingSettingsProps> = ({
173173
<img
174174
src={logo}
175175
alt={callbackName}
176-
className="w-4 h-4 object-contain"
176+
className="w-4 h-4 object-contain"
177+
onError={(e) => {
178+
// Create a div with callback initial as fallback
179+
const target = e.target as HTMLImageElement;
180+
const parent = target.parentElement;
181+
if (parent) {
182+
const fallbackDiv = document.createElement('div');
183+
fallbackDiv.className = 'w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs';
184+
fallbackDiv.textContent = callbackName.charAt(0);
185+
parent.replaceChild(fallbackDiv, target);
186+
}
187+
}}
177188
/>
178189
)}
179190
<span>{callbackName}</span>
@@ -269,7 +280,18 @@ const LoggingSettings: React.FC<LoggingSettingsProps> = ({
269280
<img
270281
src={logo}
271282
alt={callbackName}
272-
className="w-4 h-4 object-contain"
283+
className="w-4 h-4 object-contain"
284+
onError={(e) => {
285+
// Create a div with callback initial as fallback
286+
const target = e.target as HTMLImageElement;
287+
const parent = target.parentElement;
288+
if (parent) {
289+
const fallbackDiv = document.createElement('div');
290+
fallbackDiv.className = 'w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs';
291+
fallbackDiv.textContent = callbackName.charAt(0);
292+
parent.replaceChild(fallbackDiv, target);
293+
}
294+
}}
273295
/>
274296
)}
275297
<span>{callbackName}</span>

0 commit comments

Comments
 (0)