mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
fix message
This commit is contained in:
1 parent
26544ac0e4
commit
bd162f4635
2 files changed
+16
-8
No files matched your search
@@ -219,6 +219,7 @@ export function DiskManagementForm() {
|
||||
|
||||
const onSubmit = async (data: DiskStorageSchemaType) => {
|
||||
let payload = data
|
||||
setMessageState(null)
|
||||
try {
|
||||
if (
|
||||
payload.storageType !== form.formState.defaultValues?.storageType ||
|
||||
|
||||
+15
-8
@@ -21,6 +21,7 @@ import {
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogSection,
|
||||
DialogSectionSeparator,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
@@ -333,7 +334,6 @@ export const DiskManagementReviewAndSubmitDialog = ({
|
||||
<Button block size="large" type="default" onClick={() => setIsDialogOpen(false)}>
|
||||
Cancel
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
block
|
||||
type={'warning'}
|
||||
@@ -346,14 +346,21 @@ export const DiskManagementReviewAndSubmitDialog = ({
|
||||
>
|
||||
Confirm changes
|
||||
</Button>
|
||||
|
||||
{message && (
|
||||
<Alert_Shadcn_ variant={message.type === 'error' ? 'destructive' : 'default'}>
|
||||
<WarningIcon />
|
||||
<AlertTitle_Shadcn_>{message.message}</AlertTitle_Shadcn_>
|
||||
</Alert_Shadcn_>
|
||||
)}
|
||||
</DialogFooter>
|
||||
{message && (
|
||||
<>
|
||||
<DialogSectionSeparator />
|
||||
<DialogSection>
|
||||
<Alert_Shadcn_
|
||||
variant={message.type === 'error' ? 'destructive' : 'default'}
|
||||
className=""
|
||||
>
|
||||
<WarningIcon />
|
||||
<AlertTitle_Shadcn_>{message.message}</AlertTitle_Shadcn_>
|
||||
</Alert_Shadcn_>
|
||||
</DialogSection>
|
||||
</>
|
||||
)}
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user