Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

392 B
Raw Blame
import { useParams } from 'common'

import { useVectorBucketsQuery } from '@/data/storage/vector-buckets-query'

export const useSelectedVectorBucket = () => {
  const { ref: projectRef, bucketId } = useParams()

  return useVectorBucketsQuery(
    { projectRef },
    {
      select(data) {
        return data.vectorBuckets.find((x) => x.vectorBucketName === bucketId)
      },
    }
  )
}