Skip to content

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

EditBucketModal not selecting the correct unit (#38171)

Joshen Lim3ad701b8bd48
diff --git a/apps/studio/components/interfaces/Storage/BucketRow.tsx b/apps/studio/components/interfaces/Storage/BucketRow.tsx
index 4023d5ab356..d7c781cb47b 100644
--- a/apps/studio/components/interfaces/Storage/BucketRow.tsx
+++ b/apps/studio/components/interfaces/Storage/BucketRow.tsx
@@ -1,13 +1,13 @@
-import { useState } from 'react'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { Columns3, Edit2, MoreVertical, Trash, XCircle } from 'lucide-react'
import Link from 'next/link'
+import { useState } from 'react'
+import { DeleteBucketModal } from 'components/interfaces/Storage/DeleteBucketModal'
+import { EditBucketModal } from 'components/interfaces/Storage/EditBucketModal'
+import { EmptyBucketModal } from 'components/interfaces/Storage/EmptyBucketModal'
import type { Bucket } from 'data/storage/buckets-query'
import { useAsyncCheckProjectPermissions } from 'hooks/misc/useCheckPermissions'
-import EditBucketModal from 'components/interfaces/Storage/EditBucketModal'
-import DeleteBucketModal from 'components/interfaces/Storage/DeleteBucketModal'
-import EmptyBucketModal from 'components/interfaces/Storage/EmptyBucketModal'
import {
Badge,
Button,
diff --git a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
index db5181a618d..36b8f5b7990 100644
--- a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
@@ -8,14 +8,17 @@ import { SubmitHandler, useForm } from 'react-hook-form'
import { toast } from 'sonner'
import z from 'zod'
+import { PermissionAction } from '@supabase/shared-types/out/constants'
import { useParams } from 'common'
import { useIcebergWrapperExtension } from 'components/interfaces/Storage/AnalyticBucketDetails/useIcebergWrapper'
import { StorageSizeUnits } from 'components/interfaces/Storage/StorageSettings/StorageSettings.constants'
+import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { InlineLink } from 'components/ui/InlineLink'
import { useProjectStorageConfigQuery } from 'data/config/project-storage-config-query'
import { useBucketCreateMutation } from 'data/storage/bucket-create-mutation'
import { useIcebergWrapperCreateMutation } from 'data/storage/iceberg-wrapper-create-mutation'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
+import { useAsyncCheckProjectPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { BASE_PATH, IS_PLATFORM } from 'lib/constants'
import {
@@ -53,10 +56,7 @@ import {
import { Admonition } from 'ui-patterns/admonition'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { inverseValidBucketNameRegex, validBucketNameRegex } from './CreateBucketModal.utils'
-import { ButtonTooltip } from 'components/ui/ButtonTooltip'
-import { PermissionAction } from '@supabase/shared-types/out/constants'
import { convertFromBytes, convertToBytes } from './StorageSettings/StorageSettings.utils'
-import { useAsyncCheckProjectPermissions } from 'hooks/misc/useCheckPermissions'
const FormSchema = z
.object({
@@ -229,18 +229,17 @@ const CreateBucketModal = () => {
New bucket
</ButtonTooltip>
</DialogTrigger>
+
<DialogContent>
<DialogHeader>
<DialogTitle>Create storage bucket</DialogTitle>
</DialogHeader>
+
<DialogSectionSeparator />
- <DialogSection>
- <Form_Shadcn_ {...form}>
- <form
- id={formId}
- className="flex flex-col gap-4"
- onSubmit={form.handleSubmit(onSubmit)}
- >
+
+ <Form_Shadcn_ {...form}>
+ <form id={formId} onSubmit={form.handleSubmit(onSubmit)}>
+ <DialogSection>
<FormField_Shadcn_
key="name"
name="name"
@@ -311,17 +310,20 @@ const CreateBucketModal = () => {
</FormItemLayout>
)}
/>
+ </DialogSection>
- <DialogSectionSeparator />
+ <DialogSectionSeparator />
- {isStandardBucket ? (
- <>
+ {isStandardBucket ? (
+ <>
+ <DialogSection>
<FormField_Shadcn_
key="public"
name="public"
control={form.control}
render={({ field }) => (
<FormItemLayout
+ hideMessage
name="public"
label="Public bucket"
description="Anyone can read any object without any authorization"
@@ -338,30 +340,36 @@ const CreateBucketModal = () => {
</FormItemLayout>
)}
/>
- {isPublicBucket && (
- <Admonition
- type="warning"
- className="rounded-none border-x-0 border-b-0 mb-0 pb-0 px-0 [&>svg]:left-0 [&>div>p]:!leading-normal"
- title="Public buckets are not protected"
- description={
- <>
- <p className="mb-2">
- Users can read objects in public buckets without any authorization.
- </p>
- <p>
- Row level security (RLS) policies are still required for other
- operations such as object uploads and deletes.
- </p>
- </>
- }
- />
- )}
+ </DialogSection>
+
+ {isPublicBucket && (
+ <Admonition
+ type="warning"
+ className="rounded-none border-x-0 border-b-0 mb-0 [&>div>p]:!leading-normal"
+ title="Public buckets are not protected"
+ description={
+ <>
+ <p className="mb-2">
+ Users can read objects in public buckets without any authorization.
+ </p>
+ <p>
+ Row level security (RLS) policies are still required for other operations
+ such as object uploads and deletes.
+ </p>
+ </>
+ }
+ />
+ )}
+
+ <DialogSectionSeparator />
+
+ <DialogSection>
<Collapsible_Shadcn_
open={showConfiguration}
onOpenChange={() => setShowConfiguration(!showConfiguration)}
>
<CollapsibleTrigger_Shadcn_ asChild>
- <button className="w-full cursor-pointer py-3 flex items-center justify-between border-t border-default">
+ <button className="w-full cursor-pointer flex items-center justify-between">
<p className="text-sm">Additional configuration</p>
<ChevronDown
size={18}
@@ -370,7 +378,7 @@ const CreateBucketModal = () => {
/>
</button>
</CollapsibleTrigger_Shadcn_>
- <CollapsibleContent_Shadcn_ className="py-4 space-y-4">
+ <CollapsibleContent_Shadcn_ className="pt-4 space-y-4">
<div className="space-y-2">
<FormField_Shadcn_
key="has_file_size_limit"
@@ -480,82 +488,83 @@ const CreateBucketModal = () => {
/>
</CollapsibleContent_Shadcn_>
</Collapsible_Shadcn_>
- </>
- ) : (
- <>
- {icebergWrapperExtensionState === 'installed' ? (
- <Label_Shadcn_ className="text-foreground-lighter leading-1 flex flex-col gap-y-2">
- <p>
- <span>Supabase will setup a </span>
+ </DialogSection>
+ </>
+ ) : (
+ <>
+ {icebergWrapperExtensionState === 'installed' ? (
+ <Label_Shadcn_ className="text-foreground-lighter leading-1 flex flex-col gap-y-2">
+ <p>
+ <span>Supabase will setup a </span>
+ <a
+ href={`${BASE_PATH}/project/${ref}/integrations/iceberg_wrapper/overview`}
+ target="_blank"
+ className="underline text-foreground-light"
+ >
+ foreign data wrapper
+ {bucketName && <span className="text-brand"> {`${bucketName}_fdw`}</span>}
+ </a>
+ <span>
+ {' '}
+ for easier access to the data. This action will also create{' '}
<a
- href={`${BASE_PATH}/project/${ref}/integrations/iceberg_wrapper/overview`}
+ href={`${BASE_PATH}/project/${ref}/storage/access-keys`}
target="_blank"
className="underline text-foreground-light"
>
- foreign data wrapper
- {bucketName && <span className="text-brand"> {`${bucketName}_fdw`}</span>}
+ S3 Access Keys
+ {bucketName && (
+ <>
+ {' '}
+ named <span className="text-brand"> {`${bucketName}_keys`}</span>
+ </>
+ )}
</a>
- <span>
- {' '}
- for easier access to the data. This action will also create{' '}
- <a
- href={`${BASE_PATH}/project/${ref}/storage/access-keys`}
- target="_blank"
- className="underline text-foreground-light"
- >
- S3 Access Keys
- {bucketName && (
- <>
- {' '}
- named <span className="text-brand"> {`${bucketName}_keys`}</span>
- </>
- )}
- </a>
- <span> and </span>
- <a
- href={`${BASE_PATH}/project/${ref}/integrations/vault/secrets`}
- target="_blank"
- className="underline text-foreground-light"
- >
- four Vault Secrets
- {bucketName && (
- <>
- {' '}
- prefixed with{' '}
- <span className="text-brand"> {`${bucketName}_vault_`}</span>
- </>
- )}
- </a>
- .
- </span>
- </p>
+ <span> and </span>
+ <a
+ href={`${BASE_PATH}/project/${ref}/integrations/vault/secrets`}
+ target="_blank"
+ className="underline text-foreground-light"
+ >
+ four Vault Secrets
+ {bucketName && (
+ <>
+ {' '}
+ prefixed with{' '}
+ <span className="text-brand"> {`${bucketName}_vault_`}</span>
+ </>
+ )}
+ </a>
+ .
+ </span>
+ </p>
+ <p>
+ As a final step, you'll need to create an{' '}
+ <span className="text-foreground-light">Iceberg namespace</span> before you
+ connect the Iceberg data to your database.
+ </p>
+ </Label_Shadcn_>
+ ) : (
+ <Alert_Shadcn_ variant="warning">
+ <WarningIcon />
+ <AlertTitle_Shadcn_>
+ You need to install the Iceberg wrapper extension to connect your Analytic
+ bucket to your database.
+ </AlertTitle_Shadcn_>
+ <AlertDescription_Shadcn_ className="flex flex-col gap-y-2">
<p>
- As a final step, you'll need to create an{' '}
- <span className="text-foreground-light">Iceberg namespace</span> before you
- connect the Iceberg data to your database.
+ You need to install the <span className="text-brand">wrappers</span>{' '}
+ extension (with the minimum version of <span>0.5.3</span>) if you want to
+ connect your Analytics bucket to your database.
</p>
- </Label_Shadcn_>
- ) : (
- <Alert_Shadcn_ variant="warning">
- <WarningIcon />
- <AlertTitle_Shadcn_>
- You need to install the Iceberg wrapper extension to connect your Analytic
- bucket to your database.
- </AlertTitle_Shadcn_>
- <AlertDescription_Shadcn_ className="flex flex-col gap-y-2">
- <p>
- You need to install the <span className="text-brand">wrappers</span>{' '}
- extension (with the minimum version of <span>0.5.3</span>) if you want to
- connect your Analytics bucket to your database.
- </p>
- </AlertDescription_Shadcn_>
- </Alert_Shadcn_>
- )}
- </>
- )}
- </form>
- </Form_Shadcn_>
- </DialogSection>
+ </AlertDescription_Shadcn_>
+ </Alert_Shadcn_>
+ )}
+ </>
+ )}
+ </form>
+ </Form_Shadcn_>
+
<DialogFooter>
<Button
type="default"
diff --git a/apps/studio/components/interfaces/Storage/DeleteBucketModal.tsx b/apps/studio/components/interfaces/Storage/DeleteBucketModal.tsx
index 509b1969d46..7476bfe5264 100644
--- a/apps/studio/components/interfaces/Storage/DeleteBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/DeleteBucketModal.tsx
@@ -1,9 +1,9 @@
+import { zodResolver } from '@hookform/resolvers/zod'
import { get as _get, find } from 'lodash'
import { useRouter } from 'next/router'
import { SubmitHandler, useForm } from 'react-hook-form'
-import { zodResolver } from '@hookform/resolvers/zod'
-import z from 'zod'
import { toast } from 'sonner'
+import z from 'zod'
import { useParams } from 'common'
import { useDatabasePoliciesQuery } from 'data/database-policies/database-policies-query'
@@ -11,7 +11,6 @@ import { useDatabasePolicyDeleteMutation } from 'data/database-policies/database
import { useBucketDeleteMutation } from 'data/storage/bucket-delete-mutation'
import { Bucket, useBucketsQuery } from 'data/storage/buckets-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
-import { formatPoliciesForStorage } from './Storage.utils'
import {
Button,
Dialog,
@@ -25,10 +24,10 @@ import {
FormControl_Shadcn_,
FormField_Shadcn_,
Input_Shadcn_,
- Label_Shadcn_,
} from 'ui'
import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
+import { formatPoliciesForStorage } from './Storage.utils'
export interface DeleteBucketModalProps {
visible: boolean
@@ -111,23 +110,25 @@ export const DeleteBucketModal = ({ visible, bucket, onClose }: DeleteBucketModa
<Dialog
open={visible}
onOpenChange={(open) => {
- if (!open) {
- onClose()
- }
+ if (!open) onClose()
}}
>
<DialogContent>
<DialogHeader>
- <DialogTitle>{`Confirm deletion of ${bucket.name}`}</DialogTitle>
+ <DialogTitle>Confirm deletion of {bucket.name}</DialogTitle>
</DialogHeader>
+
<DialogSectionSeparator />
- <DialogSection className="flex flex-col gap-4">
- <Admonition
- type="destructive"
- title="You cannot recover this bucket once deleted."
- description="All bucket data will be lost."
- />
- <p>
+
+ <Admonition
+ type="destructive"
+ className="rounded-none border-x-0 border-t-0 mb-0"
+ title="You cannot recover this bucket once deleted."
+ description="All bucket data will be lost."
+ />
+
+ <DialogSection>
+ <p className="text-sm">
Your bucket <span className="font-bold text-foreground">{bucket.name}</span> and all its
contents will be permanently deleted.
</p>
@@ -135,11 +136,7 @@ export const DeleteBucketModal = ({ visible, bucket, onClose }: DeleteBucketModa
<DialogSectionSeparator />
<DialogSection>
<Form_Shadcn_ {...form}>
- <form
- id={formId}
- className="flex flex-col gap-4"
- onSubmit={form.handleSubmit(onSubmit)}
- >
+ <form id={formId} onSubmit={form.handleSubmit(onSubmit)}>
<FormField_Shadcn_
key="confirm"
name="confirm"
@@ -173,12 +170,10 @@ export const DeleteBucketModal = ({ visible, bucket, onClose }: DeleteBucketModa
Cancel
</Button>
<Button form={formId} htmlType="submit" type="danger" loading={isLoading}>
- Delete Bucket
+ Delete bucket
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
)
}
-
-export default DeleteBucketModal
diff --git a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
index 975f340279b..79482cd1a3f 100644
--- a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
@@ -1,11 +1,10 @@
+import { zodResolver } from '@hookform/resolvers/zod'
import { useParams } from 'common'
import { ChevronDown } from 'lucide-react'
import Link from 'next/link'
-import { useState } from 'react'
-import { toast } from 'sonner'
+import { useEffect, useState } from 'react'
import { type SubmitHandler, useForm } from 'react-hook-form'
-import { zodResolver } from '@hookform/resolvers/zod'
-import { z } from 'zod'
+import { toast } from 'sonner'
import {
Button,
CollapsibleContent_Shadcn_,
@@ -15,8 +14,8 @@ import {
DialogContent,
DialogFooter,
DialogHeader,
- DialogSectionSeparator,
DialogSection,
+ DialogSectionSeparator,
DialogTitle,
FormControl_Shadcn_,
FormField_Shadcn_,
@@ -30,6 +29,7 @@ import {
Switch,
cn,
} from 'ui'
+import { z } from 'zod'
import { StorageSizeUnits } from 'components/interfaces/Storage/StorageSettings/StorageSettings.constants'
import {
@@ -39,11 +39,11 @@ import {
import { InlineLink } from 'components/ui/InlineLink'
import { useProjectStorageConfigQuery } from 'data/config/project-storage-config-query'
import { useBucketUpdateMutation } from 'data/storage/bucket-update-mutation'
+import { Bucket } from 'data/storage/buckets-query'
import { IS_PLATFORM } from 'lib/constants'
+import { isNonNullable } from 'lib/isNonNullable'
import { Admonition } from 'ui-patterns'
-import { Bucket } from 'data/storage/buckets-query'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
-import { isNonNullable } from 'lib/isNonNullable'
export interface EditBucketModalProps {
visible: boolean
@@ -128,6 +128,14 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
)
}
+ useEffect(() => {
+ if (visible && bucket) {
+ setShowConfiguration(false)
+ const { unit } = convertFromBytes(bucket.file_size_limit ?? 0)
+ setSelectedUnit(unit)
+ }
+ }, [visible, bucket])
+
return (
<Dialog
open={visible}
@@ -142,20 +150,19 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
<DialogHeader>
<DialogTitle>{`Edit bucket "${bucket?.name}"`}</DialogTitle>
</DialogHeader>
+
<DialogSectionSeparator />
- <DialogSection>
- <Form_Shadcn_ {...form}>
- <form
- id={formId}
- className="flex flex-col gap-4"
- onSubmit={form.handleSubmit(onSubmit)}
- >
+
+ <Form_Shadcn_ {...form}>
+ <form id={formId} onSubmit={form.handleSubmit(onSubmit)}>
+ <DialogSection className="flex flex-col gap-y-4">
<FormField_Shadcn_
key="name"
name="name"
control={form.control}
render={({ field }) => (
<FormItemLayout
+ hideMessage
name="name"
label="Name of bucket"
labelOptional="Buckets cannot be renamed once created."
@@ -188,49 +195,49 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
</FormItemLayout>
)}
/>
- {isChangingBucketVisibility && (
- <Admonition
- type="warning"
- className="rounded-none border-x-0 border-b-0 mb-0 pb-0 px-0 [&>svg]:left-0 [&>div>p]:!leading-normal"
- title={
- isMakingBucketPublic
- ? 'Warning: Making bucket public'
- : isMakingBucketPrivate
- ? 'Warning: Making bucket private'
- : ''
- }
- description={
- <>
- {isMakingBucketPublic ? (
- <p>`This will make all objects in your bucket publicly accessible.`</p>
- ) : isMakingBucketPrivate ? (
- <p>
- `All objects in your bucket will be private and only accessible via signed
- URLs, or downloaded with the right authorisation headers.`
- </p>
- ) : null}
+ </DialogSection>
- {isMakingBucketPrivate && (
+ {isChangingBucketVisibility && (
+ <Admonition
+ type="warning"
+ className="rounded-none border-x-0 border-b-0 mb-0 [&>div>p]:!leading-normal"
+ title={`Warning: Making bucket ${isMakingBucketPublic ? 'public' : 'private'}`}
+ description={
+ <>
+ {isMakingBucketPublic && (
+ <p>This will make all objects in your bucket publicly accessible.</p>
+ )}
+
+ {isMakingBucketPrivate && (
+ <>
+ <p className="mb-2">
+ All objects in your bucket will be private and only accessible via signed
+ URLs, or downloaded with the right authorisation headers.
+ </p>
<p>
- {
- 'Assets cached in the CDN may still be publicly accessible. You can consider '
- }
+ Assets cached in the CDN may still be publicly accessible. You can
+ consider{' '}
<InlineLink href="https://supabase.com/docs/guides/storage/cdn/smart-cdn#cache-eviction">
purging the cache
- </InlineLink>
- {' or moving your assets to a new bucket.'}
+ </InlineLink>{' '}
+ or moving your assets to a new bucket.
</p>
- )}
- </>
- }
- />
- )}
+ </>
+ )}
+ </>
+ }
+ />
+ )}
+
+ <DialogSectionSeparator />
+
+ <DialogSection>
<Collapsible_Shadcn_
open={showConfiguration}
onOpenChange={() => setShowConfiguration(!showConfiguration)}
>
<CollapsibleTrigger_Shadcn_ asChild>
- <button className="w-full cursor-pointer py-3 flex items-center justify-between border-t border-default">
+ <button className="w-full cursor-pointer flex items-center justify-between">
<p className="text-sm">Additional configuration</p>
<ChevronDown
size={18}
@@ -239,7 +246,7 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
/>
</button>
</CollapsibleTrigger_Shadcn_>
- <CollapsibleContent_Shadcn_ className="py-4 space-y-4">
+ <CollapsibleContent_Shadcn_ className="pt-4 space-y-4">
<div className="space-y-2">
<FormField_Shadcn_
key="has_file_size_limit"
@@ -349,9 +356,10 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
/>
</CollapsibleContent_Shadcn_>
</Collapsible_Shadcn_>
- </form>
- </Form_Shadcn_>
- </DialogSection>
+ </DialogSection>
+ </form>
+ </Form_Shadcn_>
+
<DialogFooter>
<Button
type="default"
@@ -371,5 +379,3 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
</Dialog>
)
}
-
-export default EditBucketModal
diff --git a/apps/studio/components/interfaces/Storage/EmptyBucketModal.tsx b/apps/studio/components/interfaces/Storage/EmptyBucketModal.tsx
index 18e0e901eb9..3b3416834a9 100644
--- a/apps/studio/components/interfaces/Storage/EmptyBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/EmptyBucketModal.tsx
@@ -7,12 +7,12 @@ import { useStorageExplorerStateSnapshot } from 'state/storage-explorer'
import {
Button,
Dialog,
- DialogHeader,
- DialogTitle,
DialogContent,
+ DialogFooter,
+ DialogHeader,
DialogSection,
DialogSectionSeparator,
- DialogFooter,
+ DialogTitle,
} from 'ui'
import { Admonition } from 'ui-patterns'
@@ -50,9 +50,7 @@ export const EmptyBucketModal = ({ visible, bucket, onClose }: EmptyBucketModalP
<Dialog
open={visible}
onOpenChange={(open) => {
- if (!open) {
- onClose()
- }
+ if (!open) onClose()
}}
>
<DialogContent>
@@ -60,12 +58,13 @@ export const EmptyBucketModal = ({ visible, bucket, onClose }: EmptyBucketModalP
<DialogTitle>{`Confirm to delete all contents from ${bucket?.name}`}</DialogTitle>
</DialogHeader>
<DialogSectionSeparator />
- <DialogSection className="flex flex-col gap-4">
- <Admonition
- type="destructive"
- title="This action cannot be undone"
- description="The contents of your bucket cannot be recovered once deleted."
- />
+ <Admonition
+ type="destructive"
+ className="rounded-none border-x-0 border-t-0 mb-0"
+ title="This action cannot be undone"
+ description="The contents of your bucket cannot be recovered once deleted."
+ />
+ <DialogSection>
<p className="text-sm">Are you sure you want to empty the bucket "{bucket?.name}"?</p>
</DialogSection>
<DialogFooter>
@@ -73,12 +72,10 @@ export const EmptyBucketModal = ({ visible, bucket, onClose }: EmptyBucketModalP
Cancel
</Button>
<Button type="danger" loading={isLoading} onClick={onEmptyBucket}>
- Empty Bucket
+ Empty bucket
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
)
}
-
-export default EmptyBucketModal
diff --git a/apps/studio/components/interfaces/Storage/__tests__/DeleteBucketModal.test.tsx b/apps/studio/components/interfaces/Storage/__tests__/DeleteBucketModal.test.tsx
index ea63c932272..e5064dbbe08 100644
--- a/apps/studio/components/interfaces/Storage/__tests__/DeleteBucketModal.test.tsx
+++ b/apps/studio/components/interfaces/Storage/__tests__/DeleteBucketModal.test.tsx
@@ -1,15 +1,15 @@
-import { describe, expect, it, beforeEach, vi } from 'vitest'
-import { screen, waitFor, fireEvent } from '@testing-library/dom'
+import { faker } from '@faker-js/faker'
+import { fireEvent, screen, waitFor } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { useState } from 'react'
-import { faker } from '@faker-js/faker'
+import { beforeEach, describe, expect, it, vi } from 'vitest'
-import { addAPIMock } from 'tests/lib/msw'
import { ProjectContextProvider } from 'components/layouts/ProjectLayout/ProjectContext'
import { Bucket } from 'data/storage/buckets-query'
-import DeleteBucketModal from '../DeleteBucketModal'
import { render } from 'tests/helpers'
+import { addAPIMock } from 'tests/lib/msw'
import { routerMock } from 'tests/lib/route-mock'
+import { DeleteBucketModal } from '../DeleteBucketModal'
const bucket: Bucket = {
id: faker.string.uuid(),
diff --git a/apps/studio/components/interfaces/Storage/__tests__/EditBucketModal.test.tsx b/apps/studio/components/interfaces/Storage/__tests__/EditBucketModal.test.tsx
index 0ae72262586..3dd0c9bb8fe 100644
--- a/apps/studio/components/interfaces/Storage/__tests__/EditBucketModal.test.tsx
+++ b/apps/studio/components/interfaces/Storage/__tests__/EditBucketModal.test.tsx
@@ -1,14 +1,14 @@
-import { describe, expect, it, beforeEach, vi } from 'vitest'
-import { screen, waitFor, fireEvent } from '@testing-library/dom'
+import { faker } from '@faker-js/faker'
+import { fireEvent, screen, waitFor } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { useState } from 'react'
-import { faker } from '@faker-js/faker'
+import { beforeEach, describe, expect, it, vi } from 'vitest'
-import { addAPIMock } from 'tests/lib/msw'
import { ProjectContextProvider } from 'components/layouts/ProjectLayout/ProjectContext'
import { Bucket } from 'data/storage/buckets-query'
import { render } from 'tests/helpers'
-import EditBucketModal from '../EditBucketModal'
+import { addAPIMock } from 'tests/lib/msw'
+import { EditBucketModal } from '../EditBucketModal'
const bucket: Bucket = {
id: faker.string.uuid(),
diff --git a/apps/studio/components/interfaces/Storage/__tests__/EmptyBucketModal.test.tsx b/apps/studio/components/interfaces/Storage/__tests__/EmptyBucketModal.test.tsx
index 85762108745..914c4195fc0 100644
--- a/apps/studio/components/interfaces/Storage/__tests__/EmptyBucketModal.test.tsx
+++ b/apps/studio/components/interfaces/Storage/__tests__/EmptyBucketModal.test.tsx
@@ -1,15 +1,15 @@
-import { describe, expect, it, beforeEach, vi } from 'vitest'
-import { screen, waitFor, fireEvent } from '@testing-library/dom'
+import { faker } from '@faker-js/faker'
+import { fireEvent, screen, waitFor } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { useState } from 'react'
-import { faker } from '@faker-js/faker'
+import { beforeEach, describe, expect, it, vi } from 'vitest'
-import { addAPIMock } from 'tests/lib/msw'
import { ProjectContextProvider } from 'components/layouts/ProjectLayout/ProjectContext'
import { Bucket } from 'data/storage/buckets-query'
-import EmptyBucketModal from '../EmptyBucketModal'
import { render } from 'tests/helpers'
+import { addAPIMock } from 'tests/lib/msw'
import { routerMock } from 'tests/lib/route-mock'
+import { EmptyBucketModal } from '../EmptyBucketModal'
const bucket: Bucket = {
id: faker.string.uuid(),
diff --git a/apps/studio/components/interfaces/Storage/index.ts b/apps/studio/components/interfaces/Storage/index.ts
index efecd4c782b..2cc7a39e25a 100644
--- a/apps/studio/components/interfaces/Storage/index.ts
+++ b/apps/studio/components/interfaces/Storage/index.ts
@@ -2,4 +2,4 @@ export { default as StorageExplorer } from './StorageExplorer/StorageExplorer'
export { default as StoragePolicies } from './StoragePolicies/StoragePolicies'
export { default as StorageSettings } from './StorageSettings/StorageSettings'
-export { default as DeleteBucketModal } from './DeleteBucketModal'
+export { DeleteBucketModal } from './DeleteBucketModal'