mirror of
https://github.com/supabase/supabase.git
synced 2026-05-15 07:14:04 +08:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
20 lines
326 B
TypeScript
20 lines
326 B
TypeScript
import { useParams } from 'common'
|
|
|
|
import { useBucketQuery } from '@/data/storage/buckets-query'
|
|
|
|
export const useSelectedBucket = () => {
|
|
const { ref, bucketId } = useParams()
|
|
|
|
const query = useBucketQuery(
|
|
{
|
|
projectRef: ref,
|
|
bucketId,
|
|
},
|
|
{
|
|
enabled: !!bucketId,
|
|
}
|
|
)
|
|
|
|
return query
|
|
}
|