This repository has no description
1import { useSuspenseQuery } from '@tanstack/react-query';
2import { getFollowersCount } from '../dal';
3import { followKeys } from '../followKeys';
4
5interface Props {
6 identifier: string;
7}
8
9export default function useFollowersCount({ identifier }: Props) {
10 const query = useSuspenseQuery({
11 queryKey: followKeys.followersCount(identifier),
12 queryFn: () => getFollowersCount(identifier),
13 staleTime: 10000,
14 });
15
16 return query;
17}