Skip to content

Commit 6ceae05

Browse files
committed
cmd: fix icon size
1 parent ff1b9cc commit 6ceae05

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

static/app/components/search/searchResult.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {Fragment} from 'react';
22
import styled from '@emotion/styled';
3+
import * as Sentry from '@sentry/react';
34

45
import {DocIntegrationAvatar} from 'sentry/components/core/avatar/docIntegrationAvatar';
56
import {SentryAppAvatar} from 'sentry/components/core/avatar/sentryAppAvatar';
@@ -18,6 +19,8 @@ type Props = {
1819
matches: Result['matches'];
1920
};
2021

22+
const DEFAULT_AVATAR_SIZE = 24;
23+
2124
function renderResultType({resultType, model}: Result['item']) {
2225
switch (resultType) {
2326
case 'settings':
@@ -27,12 +30,16 @@ function renderResultType({resultType, model}: Result['item']) {
2730
case 'route':
2831
return <IconLink />;
2932
case 'integration':
30-
return <StyledPluginIcon pluginId={model.slug} />;
33+
return <StyledPluginIcon size={DEFAULT_AVATAR_SIZE} pluginId={model.slug} />;
3134
case 'sentryApp':
32-
return <SentryAppAvatar sentryApp={model} />;
35+
return <SentryAppAvatar size={DEFAULT_AVATAR_SIZE} sentryApp={model} />;
3336
case 'docIntegration':
34-
return <DocIntegrationAvatar docIntegration={model} />;
37+
return <DocIntegrationAvatar size={DEFAULT_AVATAR_SIZE} docIntegration={model} />;
3538
default:
39+
Sentry.captureMessage(
40+
`Unknown result type: ${resultType}. Nothing will be rendered.`,
41+
{level: 'warning'}
42+
);
3643
return null;
3744
}
3845
}

0 commit comments

Comments
 (0)