mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 05:13:43 +00:00
Fix: Restructured frontend
This commit is contained in:
@@ -104,7 +104,7 @@ export const SecretMainPage = () => {
|
||||
}
|
||||
});
|
||||
// fetch folders
|
||||
const { data: folderData, isLoading: isFoldersLoading } = useGetProjectFolders({
|
||||
const { data: folders, isLoading: isFoldersLoading } = useGetProjectFolders({
|
||||
projectId: workspaceId,
|
||||
environment,
|
||||
path: secretPath
|
||||
@@ -163,9 +163,7 @@ export const SecretMainPage = () => {
|
||||
isPaused: !canDoReadRollback
|
||||
});
|
||||
|
||||
const isNotEmtpy = Boolean(
|
||||
secrets?.length || folderData?.folders?.length || secretImports?.length
|
||||
);
|
||||
const isNotEmtpy = Boolean(secrets?.length || folders?.length || secretImports?.length);
|
||||
|
||||
const handleSortToggle = () =>
|
||||
setSortDir((state) => (state === SortDir.ASC ? SortDir.DESC : SortDir.ASC));
|
||||
@@ -294,7 +292,7 @@ export const SecretMainPage = () => {
|
||||
/>
|
||||
)}
|
||||
<FolderListView
|
||||
folders={folderData?.folders}
|
||||
folders={folders}
|
||||
environment={environment}
|
||||
workspaceId={workspaceId}
|
||||
secretPath={secretPath}
|
||||
@@ -314,7 +312,7 @@ export const SecretMainPage = () => {
|
||||
isProtectedBranch={isProtectedBranch}
|
||||
/>
|
||||
)}
|
||||
{!canReadSecret && folderData?.folders?.length === 0 && <PermissionDeniedBanner />}
|
||||
{!canReadSecret && folders?.length === 0 && <PermissionDeniedBanner />}
|
||||
</div>
|
||||
</div>
|
||||
<CreateSecretForm
|
||||
@@ -354,7 +352,7 @@ export const SecretMainPage = () => {
|
||||
workspaceId={workspaceId}
|
||||
secretPath={secretPath}
|
||||
secrets={secrets}
|
||||
folders={folderData?.folders}
|
||||
folders={folders}
|
||||
snapshotCount={snapshotCount}
|
||||
onGoBack={handleResetSnapshot}
|
||||
onClickListSnapshot={() => handlePopUpToggle("snapshots", true)}
|
||||
|
||||
Reference in New Issue
Block a user