Merge pull request #3330 from Infisical/fix/snapshotsInfiniteLoading

Fix infinite loading icon on snapshot button
This commit is contained in:
carlosmonastyrski
2025-03-28 16:51:29 -03:00
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -329,7 +329,7 @@ export const MinimizedOrgSidebar = () => {
)}
</Link>
<div className="my-1 w-full bg-mineshaft-500" style={{ height: "1px" }} />
<DropdownMenu open={open} onOpenChange={setOpen}>
<DropdownMenu open={open} onOpenChange={setOpen} modal={false}>
<DropdownMenuTrigger
onMouseEnter={() => setOpen(true)}
onMouseLeave={() => setOpen(false)}
@@ -396,7 +396,7 @@ export const MinimizedOrgSidebar = () => {
: "mb-4"
} flex w-full cursor-default flex-col items-center px-1 text-sm text-mineshaft-400`}
>
<DropdownMenu open={openSupport} onOpenChange={setOpenSupport}>
<DropdownMenu open={openSupport} onOpenChange={setOpenSupport} modal={false}>
<DropdownMenuTrigger
onMouseEnter={() => setOpenSupport(true)}
onMouseLeave={() => setOpenSupport(false)}
@@ -479,7 +479,7 @@ export const MinimizedOrgSidebar = () => {
</button>
</Tooltip>
)}
<DropdownMenu open={openUser} onOpenChange={setOpenUser}>
<DropdownMenu open={openUser} onOpenChange={setOpenUser} modal={false}>
<DropdownMenuTrigger
onMouseEnter={() => setOpenUser(true)}
onMouseLeave={() => setOpenUser(false)}

View File

@@ -250,7 +250,11 @@ const Page = () => {
limit: 10
});
const { data: snapshotCount, isPending: isSnapshotCountLoading } = useGetWsSnapshotCount({
const {
data: snapshotCount,
isPending: isSnapshotCountLoading,
isFetching: isSnapshotCountFetching
} = useGetWsSnapshotCount({
workspaceId,
environment,
directory: secretPath,
@@ -414,7 +418,7 @@ const Page = () => {
onSearchChange={handleSearchChange}
onToggleTagFilter={handleTagToggle}
snapshotCount={snapshotCount || 0}
isSnapshotCountLoading={isSnapshotCountLoading}
isSnapshotCountLoading={isSnapshotCountLoading && isSnapshotCountFetching}
onToggleRowType={handleToggleRowType}
onClickRollbackMode={() => handlePopUpToggle("snapshots", true)}
protectedBranchPolicyName={boardPolicy?.name}