mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
17 lines
568 B
TypeScript
17 lines
568 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { organizationService } from "#/api/organization-service/organization-service.api";
|
|
import { useSelectedOrganizationId } from "#/context/use-selected-organization";
|
|
|
|
export const useOrganizationPaymentInfo = () => {
|
|
const { organizationId } = useSelectedOrganizationId();
|
|
|
|
return useQuery({
|
|
queryKey: ["organizations", organizationId, "payment"],
|
|
queryFn: () =>
|
|
organizationService.getOrganizationPaymentInfo({
|
|
orgId: organizationId!,
|
|
}),
|
|
enabled: !!organizationId,
|
|
});
|
|
};
|