diff --git a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarDialog.tsx b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarDialog.tsx index 21f31901..a3988ae3 100644 --- a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarDialog.tsx +++ b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarDialog.tsx @@ -26,28 +26,23 @@ export const ProjectSearchBarDialog = ({ const client = useGQLClient(); const navigate = useNavigate(); - const { - getMenuProps, - getInputProps, - getItemProps, - inputValue, - setInputValue, - } = useCombobox({ - items, - itemToString(item) { - return item ? item.name : ''; - }, - selectedItem, - onSelectedItemChange: ({ selectedItem: newSelectedItem }) => { - if (newSelectedItem) { - setSelectedItem(newSelectedItem); - onClickItem?.(newSelectedItem); - navigate( - `/${newSelectedItem.organization.slug}/projects/${newSelectedItem.id}`, - ); - } - }, - }); + const { getInputProps, getItemProps, inputValue, setInputValue } = + useCombobox({ + items, + itemToString(item) { + return item ? item.name : ''; + }, + selectedItem, + onSelectedItemChange: ({ selectedItem: newSelectedItem }) => { + if (newSelectedItem) { + setSelectedItem(newSelectedItem); + onClickItem?.(newSelectedItem); + navigate( + `/${newSelectedItem.organization.slug}/projects/${newSelectedItem.id}`, + ); + } + }, + }); const debouncedInputValue = useDebounce(inputValue, 500); @@ -74,9 +69,10 @@ export const ProjectSearchBarDialog = ({ return ( -
- -
+ + +
+
} @@ -89,7 +85,7 @@ export const ProjectSearchBarDialog = ({
{/* Content */} -
+
{items.length > 0 ? items.map((item, index) => ( <> @@ -107,8 +103,8 @@ export const ProjectSearchBarDialog = ({ )) : inputValue && }
- -
+
+
);