teableio/teable

View on GitHub
apps/nextjs-app/src/features/app/blocks/space/useBaseList.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import { useQuery } from '@tanstack/react-query';
import { getBaseAll } from '@teable/openapi';
import { ReactQueryKeys } from '@teable/sdk/config';

export const useBaseList = () => {
  const { data: baseList } = useQuery({
    queryKey: ReactQueryKeys.baseAll(),
    queryFn: () => getBaseAll().then((res) => res.data),
  });

  return baseList;
};