Skip to content

Commit ebcbaa5

Browse files
committed
Apply PR suggestions
1 parent d344d9c commit ebcbaa5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

site/src/components/Filter/SelectFilter.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "./SelectFilter";
1212

1313
const options: SelectFilterOption[] = Array.from({ length: 50 }, (_, i) => ({
14-
startIcon: <UserAvatar username={`username ${i}`} size="xs" />,
14+
startIcon: <UserAvatar username={`username ${i + 1}`} size="xs" />,
1515
label: `Option ${i + 1}`,
1616
value: `option-${i + 1}`,
1717
}));

site/src/components/SelectMenu/SelectMenu.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { action } from "@storybook/addon-actions";
12
import type { Meta, StoryObj } from "@storybook/react";
23
import { userEvent, within } from "@storybook/test";
34
import { UserAvatar } from "components/UserAvatar/UserAvatar";
@@ -109,7 +110,7 @@ export const NoSelectedOption: Story = {
109110
<SelectMenuButton css={{ width: 200 }}>All users</SelectMenuButton>
110111
</SelectMenuTrigger>
111112
<SelectMenuContent>
112-
<SelectMenuSearch onChange={() => {}} />
113+
<SelectMenuSearch onChange={action("search")} />
113114
<SelectMenuList>
114115
{opts.map((o) => (
115116
<SelectMenuItem key={o}>

site/src/pages/WorkspacesPage/filter/menus.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ export const useTemplateFilterMenu = ({
3131
const template = templates.find((template) => template.name === value);
3232
if (template) {
3333
return {
34-
label:
35-
template.display_name !== ""
36-
? template.display_name
37-
: template.name,
34+
label: template.display_name || template.name,
3835
value: template.name,
3936
startIcon: <TemplateAvatar size="xs" template={template} />,
4037
};

0 commit comments

Comments
 (0)