mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
* chore: separate interfaces per bucket type * chore: reuse existing bucket creation modal for files * chore: allow external trigger for new bucket modal * chore: minor fixes * chore: full-size empty state * chore: files other tabs * fix: show tab bar when on file subroute * chore: use existing table component to list buckets * fix: tests * fix: build error * chore: remove future bucket type components from PR * fix: dependency * Couple of refactors to simplify implementation * Fix TS * chore: move s3 settings out to sidebar * fix: minor nits * fix: reuse existing loading spinners from schema visualiser * fix: loading for files * fix: prevent loading of table for zero buckets * chore: improved loading state * chore: shimmer on table * chore: copywriting on S3 * chore: improve empty states * fix: deprecated input instructions * fix: filter/search bucket table * chore: tidy * fix: tests * Minor refactors * Rename * Nit * Shift V2 re-routing logic to layout level --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
26 lines
1.0 KiB
TypeScript
26 lines
1.0 KiB
TypeScript
import { CreateBucketModal } from './CreateBucketModal'
|
|
import { BUCKET_TYPES } from './Storage.constants'
|
|
|
|
interface EmptyBucketStateProps {
|
|
bucketType: keyof typeof BUCKET_TYPES
|
|
}
|
|
|
|
export const EmptyBucketState = ({ bucketType }: EmptyBucketStateProps) => {
|
|
const config = BUCKET_TYPES[bucketType]
|
|
|
|
return (
|
|
<aside className="mt-12 border border-dashed w-full bg-surface-100 rounded-lg px-4 py-10 flex flex-col gap-6 items-center text-center gap-1 text-balance">
|
|
<div className="flex flex-col gap-1">
|
|
<h3>Create {config.label}</h3>
|
|
<p className="text-foreground-light text-sm">{config.valueProp}</p>
|
|
</div>
|
|
|
|
{/* [Joshen] We can render the individual bucket modals here instead - where each modal has its own trigger */}
|
|
{/* [Danny] CreateBucketModal needs to be split into CreateFileBucketModal, CreateAnalyticsBucketModal, CreateVectorsBucketModal */}
|
|
{bucketType === 'files' && (
|
|
<CreateBucketModal buttonSize="tiny" buttonType="primary" buttonClassName="w-fit" />
|
|
)}
|
|
</aside>
|
|
)
|
|
}
|