deploy
This commit is contained in:
12
src/features/admin/hooks/useOrganizationWallets.ts
Normal file
12
src/features/admin/hooks/useOrganizationWallets.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { getOrganizationWallets } from '../api/adminApi'
|
||||
|
||||
export const WALLETS_QUERY_KEY = (orgId: string) => ['admin-wallets', orgId]
|
||||
|
||||
export function useOrganizationWallets(orgId: string | undefined) {
|
||||
return useQuery({
|
||||
queryKey: WALLETS_QUERY_KEY(orgId ?? ''),
|
||||
queryFn: () => getOrganizationWallets(orgId as string),
|
||||
enabled: !!orgId,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user