Skip to content

Commit

Permalink
Merge branch 'eclipse-xpanse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLiNaruto authored Dec 12, 2024
2 parents c9bdfaf + 359f204 commit 8b44833
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function MyServices(): React.JSX.Element {
const [clearFormVariables] = useOrderFormStore((state) => [state.clearFormVariables]);
const navigate = useNavigate();
const listDeployedServicesQuery = useListDeployedServicesDetailsQuery();
const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(activeRecord?.serviceTemplateId);
const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(activeRecord?.serviceId);

const getDestroyServiceStatusPollingQuery = useLatestServiceOrderStatusQuery(
serviceDestroyQuery.data?.orderId ?? '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@

import { useQuery } from '@tanstack/react-query';
import {
getOrderableServiceDetailsById,
type GetOrderableServiceDetailsByIdData,
getOrderableServiceDetailsByServiceId,
GetOrderableServiceDetailsByServiceIdData,
} from '../../../../../xpanse-api/generated';

export default function useGetOrderableServiceDetailsQuery(serviceTemplateId: string | undefined) {
export default function useGetOrderableServiceDetailsQuery(serviceId: string | undefined) {
return useQuery({
queryKey: ['getOrderableServiceDetailsById', serviceTemplateId],
queryKey: ['getOrderableServiceDetailsByServiceId', serviceId],
queryFn: () => {
const data: GetOrderableServiceDetailsByIdData = {
id: serviceTemplateId ?? '',
const data: GetOrderableServiceDetailsByServiceIdData = {
serviceId: serviceId ?? '',
};
return getOrderableServiceDetailsById(data);
return getOrderableServiceDetailsByServiceId(data);
},
refetchOnWindowFocus: false,
enabled: serviceTemplateId !== undefined && serviceTemplateId.length > 0,
enabled: serviceId !== undefined && serviceId.length > 0,
});
}

0 comments on commit 8b44833

Please sign in to comment.