mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 07:26:45 +00:00
fix: hide pagination if table empty and add optional chaining operator to fix invalid imports
This commit is contained in:
@@ -220,7 +220,7 @@ export const fnSecretsV2FromImports = async ({
|
|||||||
const secretsFromdeeperImportGroupedByFolderId = groupBy(secretsFromDeeperImports, (i) => i.importFolderId);
|
const secretsFromdeeperImportGroupedByFolderId = groupBy(secretsFromDeeperImports, (i) => i.importFolderId);
|
||||||
|
|
||||||
const processedImports = allowedImports.map(({ importPath, importEnv, id, folderId }, i) => {
|
const processedImports = allowedImports.map(({ importPath, importEnv, id, folderId }, i) => {
|
||||||
const sourceImportFolder = importedFolderGroupBySourceImport[`${importEnv.id}-${importPath}`][0];
|
const sourceImportFolder = importedFolderGroupBySourceImport[`${importEnv.id}-${importPath}`]?.[0];
|
||||||
const folderDeeperImportSecrets =
|
const folderDeeperImportSecrets =
|
||||||
secretsFromdeeperImportGroupedByFolderId?.[sourceImportFolder?.id || ""]?.[0]?.secrets || [];
|
secretsFromdeeperImportGroupedByFolderId?.[sourceImportFolder?.id || ""]?.[0]?.secrets || [];
|
||||||
const secretsWithDuplicate = (importedSecretsGroupByFolderId?.[importedFolders?.[i]?.id as string] || [])
|
const secretsWithDuplicate = (importedSecretsGroupByFolderId?.[importedFolders?.[i]?.id as string] || [])
|
||||||
|
|||||||
+1
-1
@@ -277,7 +277,7 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
})}
|
})}
|
||||||
</TBody>
|
</TBody>
|
||||||
</Table>
|
</Table>
|
||||||
{!isLoading && data && (
|
{!isLoading && data && data.totalCount > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
count={data.totalCount}
|
count={data.totalCount}
|
||||||
page={page}
|
page={page}
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
})}
|
})}
|
||||||
</TBody>
|
</TBody>
|
||||||
</Table>
|
</Table>
|
||||||
{!isLoading && data && (
|
{!isLoading && data && data.totalCount > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
count={data.totalCount}
|
count={data.totalCount}
|
||||||
page={page}
|
page={page}
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ export const SecretMainPage = () => {
|
|||||||
{!canReadSecret && folders?.length === 0 && <PermissionDeniedBanner />}
|
{!canReadSecret && folders?.length === 0 && <PermissionDeniedBanner />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!isDetailsLoading && (
|
{!isDetailsLoading && totalCount > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
startAdornment={
|
startAdornment={
|
||||||
<SecretTableResourceCount
|
<SecretTableResourceCount
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ export const SecretOverviewPage = () => {
|
|||||||
</Tr>
|
</Tr>
|
||||||
</TFoot>
|
</TFoot>
|
||||||
</Table>
|
</Table>
|
||||||
{!isOverviewLoading && (
|
{!isOverviewLoading && totalCount > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
startAdornment={
|
startAdornment={
|
||||||
<SecretTableResourceCount
|
<SecretTableResourceCount
|
||||||
|
|||||||
Reference in New Issue
Block a user