2021-05-20 08:30:20 +02:00
|
|
|
/*
|
2024-09-24 09:42:07 +02:00
|
|
|
* Copyright (c) 2020 - present Cloudogu GmbH
|
2021-05-20 08:30:20 +02:00
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
|
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
|
|
|
* Software Foundation, version 3.
|
2021-05-20 08:30:20 +02:00
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
|
|
|
* details.
|
2021-05-20 08:30:20 +02:00
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
2021-05-20 08:30:20 +02:00
|
|
|
*/
|
2024-09-24 09:42:07 +02:00
|
|
|
|
2021-06-15 15:36:21 +02:00
|
|
|
import { Link } from "@scm-manager/ui-types";
|
2021-05-20 08:30:20 +02:00
|
|
|
import { useIndexLinks } from "./base";
|
2021-06-15 15:36:21 +02:00
|
|
|
import { useSuggestions } from "./suggestions";
|
2021-05-20 08:30:20 +02:00
|
|
|
|
|
|
|
|
export const useUserSuggestions = () => {
|
|
|
|
|
const indexLinks = useIndexLinks();
|
2021-06-15 15:36:21 +02:00
|
|
|
const autocompleteLink = (indexLinks.autocomplete as Link[]).find((i) => i.name === "users");
|
|
|
|
|
return useSuggestions(autocompleteLink?.href);
|
2021-05-20 08:30:20 +02:00
|
|
|
};
|