-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate InstallationService GetInstallationWorkspaceDefaultImage meth…
…od (#19221)
- Loading branch information
1 parent
633f991
commit da125ed
Showing
13 changed files
with
581 additions
and
247 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
components/dashboard/src/data/installation/default-workspace-image-query.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Copyright (c) 2023 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License.AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import { useQuery } from "@tanstack/react-query"; | ||
import { installationClient } from "../../service/public-api"; | ||
|
||
export const useInstallationDefaultWorkspaceImageQuery = () => { | ||
return useQuery({ | ||
queryKey: ["installation-default-workspace-image"], | ||
staleTime: 1000 * 60 * 10, // 10 minute | ||
queryFn: async () => { | ||
const response = await installationClient.getInstallationWorkspaceDefaultImage({}); | ||
return response.defaultWorkspaceImage; | ||
}, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.