Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/data/installation/default-workspace-image-query.ts
2501 views
1
/**
2
* Copyright (c) 2023 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 useInstallationDefaultWorkspaceImageQuery = () => {
11
return useQuery({
12
queryKey: ["installation-default-workspace-image"],
13
staleTime: 1000 * 60 * 10, // 10 minute
14
queryFn: async () => {
15
const response = await installationClient.getInstallationWorkspaceDefaultImage({});
16
return response.defaultWorkspaceImage;
17
},
18
});
19
};
20
21