Skip to content

Commit

Permalink
FIX #751
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Sep 13, 2024
1 parent e76ea2b commit 3194c3b
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,9 @@ export const SearchPanel = () => {
}, []);

const search = (inputValue: string) => {
const options = [
{
value: 'me',
label: translate('My profile'),
type: 'link',
url: '/me',
},
];
if (connectedUser?.isDaikokuAdmin)
options.push({
value: 'daikoku',
label: translate('Daikoku settings'),
type: 'link',
url: `/settings/tenants`,
});

const utils = {
label: 'Daikoku',
options: options.filter((i) => i.label.toLowerCase().includes(inputValue.toLowerCase())),
};

return Services.search(inputValue)
.then((result) =>
setResults([
utils,
...result.map((item: any) => ({
...item,
label: translate(item.label)
Expand Down

0 comments on commit 3194c3b

Please sign in to comment.