Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/data/installation/installation-config-query.ts
2501 views
1
/**
2
* Copyright (c) 2025 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { useQuery } from "@tanstack/react-query";
8
import { installationClient } from "../../service/public-api";
9
10
export const useInstallationConfiguration = () => {
11
return useQuery({
12
queryKey: ["installation-configuration"],
13
staleTime: 1000 * 60 * 30, // 30 minutes
14
cacheTime: 1000 * 60 * 60 * 24, // 24 hours
15
queryFn: async () => {
16
const response = await installationClient.getInstallationConfiguration({});
17
return response.configuration;
18
},
19
});
20
};
21
22