Skip to content
Prev Previous commit
Next Next commit
Fix eslint error
  • Loading branch information
BrunoQuaresma committed Sep 13, 2022
commit e5792facf21053d36dc1873a5542bdf97e56ffd5
4 changes: 3 additions & 1 deletion site/src/components/Resources/ResourceAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export const ResourceAvatar: React.FC<ResourceAvatarProps> = ({ resource }) => {
const hasIcon = resource.icon && resource.icon !== ""
const avatarSrc = hasIcon
? resource.icon
: iconPathByResource[resource.type] ?? iconPathByResource["null_resource"]
: // resource.type is dynamic so iconPathByResource[resource.type] can be null
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
iconPathByResource[resource.type] ?? iconPathByResource["null_resource"]
const styles = useStyles()

return <Avatar className={styles.resourceAvatar} src={avatarSrc} />
Expand Down