mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
24 lines
626 B
TypeScript
24 lines
626 B
TypeScript
import BaseAvatar from 'sentry/components/avatar/baseAvatar';
|
|
import PluginIcon from 'sentry/plugins/components/pluginIcon';
|
|
import type {DocIntegration} from 'sentry/types';
|
|
|
|
type Props = {
|
|
docIntegration?: DocIntegration;
|
|
} & BaseAvatar['props'];
|
|
|
|
function DocIntegrationAvatar({docIntegration, ...props}: Props) {
|
|
if (!docIntegration?.avatar) {
|
|
return <PluginIcon {...props} pluginId={docIntegration?.slug} />;
|
|
}
|
|
return (
|
|
<BaseAvatar
|
|
{...props}
|
|
type="upload"
|
|
uploadUrl={docIntegration.avatar.avatarUrl}
|
|
title={docIntegration.name}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default DocIntegrationAvatar;
|