mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
fix issues
This commit is contained in:
1 parent
a4c69fdbb5
commit
953e9a492f
4 files changed
+4
-16
No files matched your search
@@ -177,13 +177,7 @@ export function DiskManagementForm() {
|
||||
/**
|
||||
* State handling
|
||||
*/
|
||||
const isLoading =
|
||||
isAddonsLoading ||
|
||||
isDiskAttributesLoading ||
|
||||
isDiskUtilizationLoading ||
|
||||
isReadReplicasLoading ||
|
||||
isSubscriptionLoading ||
|
||||
isCooldownLoading
|
||||
|
||||
const isSuccess =
|
||||
isAddonsSuccess &&
|
||||
isDiskAttributesSuccess &&
|
||||
@@ -192,9 +186,6 @@ export function DiskManagementForm() {
|
||||
isSubscriptionSuccess &&
|
||||
isCooldownSuccess
|
||||
|
||||
const error =
|
||||
addonsError ?? diskAttributesError ?? diskUtilError ?? readReplicasError ?? subscriptionError
|
||||
|
||||
const isRequestingChanges = data?.requested_modification !== undefined
|
||||
const readReplicas = (databases ?? []).filter((db) => db.identifier !== projectRef)
|
||||
const isPlanUpgradeRequired = subscription?.plan.id === 'free'
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ export const DiskManagementReviewAndSubmitDialog = ({
|
||||
title="Resizing your Compute will trigger a project restart"
|
||||
description="Project will restart automatically on confirmation."
|
||||
/>
|
||||
{hasDiskConfigChanges && <DiskMangementCoolDownSection />}
|
||||
<DiskMangementCoolDownSection visible={hasDiskConfigChanges} />
|
||||
</div>
|
||||
<DialogSectionSeparator />
|
||||
<Table>
|
||||
|
||||
+2
-3
@@ -4,11 +4,10 @@ import { useEffect, useState } from 'react'
|
||||
import CountdownTimerRadial from 'components/ui/CountdownTimer/CountdownTimerRadial'
|
||||
import { DialogSection } from 'ui'
|
||||
|
||||
export const DiskMangementCoolDownSection = () => {
|
||||
export const DiskMangementCoolDownSection = ({ visible }: { visible: boolean }) => {
|
||||
const [progress, setProgress] = useState(100)
|
||||
const [showCountdown, setShowCountdown] = useState(false)
|
||||
const [isJumping, setIsJumping] = useState(false)
|
||||
const [isVisible, setIsVisible] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
const startCountdown = () => {
|
||||
@@ -40,7 +39,7 @@ export const DiskMangementCoolDownSection = () => {
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{isVisible && (
|
||||
{visible && (
|
||||
<motion.div
|
||||
initial={{ opacity: 1, height: 'auto' }}
|
||||
exit={{ opacity: 0, height: 0 }}
|
||||
|
||||
@@ -30,8 +30,6 @@ export default function DiskSpaceBar({ form }: DiskSpaceBarProps) {
|
||||
const {
|
||||
data: diskUtil,
|
||||
// to do, error handling
|
||||
isLoading: isDiskUtilizationLoading,
|
||||
error: diskUtilError,
|
||||
} = useDiskUtilizationQuery({
|
||||
projectRef: ref,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user