frontend client for gemstone. decentralised workplace app
1import { getOwnerInfoFromShard } from "@/queries/get-owner-info-from-shard";
2import { useQuery } from "@tanstack/react-query";
3
4export const useShardInfoQuery = (shardDomain: string) => {
5 const queryKey = ["shardInfo", shardDomain];
6 return {
7 queryKey,
8 useQuery: () =>
9 useQuery({
10 queryKey,
11 queryFn: async () => {
12 return await getOwnerInfoFromShard(shardDomain);
13 },
14 retry: 1,
15 }),
16 };
17};