mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
fix: remove hardcoded SubDomain conditional logic from EntityAvatar
- Remove special case handling for SubDomain icons
- Remove unused SubDomainIcon import
- Let getDefaultIconForEntityType handle all entity types uniformly
- Ensures consistent icon selection across all entity types
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f891d09724
commit
192ccb6cf1
@ -13,7 +13,6 @@
|
||||
|
||||
import { Avatar, useTheme } from '@mui/material';
|
||||
import { FC } from 'react';
|
||||
import { ReactComponent as SubDomainIcon } from '../../../assets/svg/ic-subdomain.svg';
|
||||
import {
|
||||
getDefaultIconForEntityType,
|
||||
ICON_MAP,
|
||||
@ -48,9 +47,6 @@ export const EntityAvatar: FC<EntityAvatarProps> = ({
|
||||
const theme = useTheme();
|
||||
const bgColor = entity.style?.color || theme.palette.allShades.brand[600];
|
||||
|
||||
// Check if it's a sub-domain
|
||||
const isSubDomain = entity.parent?.type === 'domain';
|
||||
|
||||
// Check if it's a URL (for Avatar src prop)
|
||||
const isUrl =
|
||||
entity.style?.iconURL &&
|
||||
@ -100,12 +96,7 @@ export const EntityAvatar: FC<EntityAvatarProps> = ({
|
||||
}
|
||||
|
||||
// Default icons when no iconURL is provided
|
||||
let DefaultIcon;
|
||||
if (isSubDomain) {
|
||||
DefaultIcon = SubDomainIcon;
|
||||
} else {
|
||||
DefaultIcon = getDefaultIconForEntityType(entity.entityType);
|
||||
}
|
||||
const DefaultIcon = getDefaultIconForEntityType(entity.entityType);
|
||||
|
||||
return (
|
||||
<Avatar
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user