Skip to content

Commit 77eec81

Browse files
committed
Improve audit logs rendering logic to handle missing data
- Updated the rendering logic to display a secondary text when no data is available. - Removed unnecessary properties from the data object before rendering to enhance performance and clarity.
1 parent 0a8155e commit 77eec81

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pages/audit-logs.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,15 @@ const columns: ColumnType<AuditLog>[] = [
164164
return <Text>原生包</Text>;
165165
}
166166
}
167-
return data ? (
167+
if (!data) {
168+
return <Text type="secondary">-</Text>;
169+
}
170+
delete data.deps;
171+
delete data.commit;
172+
return (
168173
<Text ellipsis={{ tooltip: JSON.stringify(data, null, 2) }}>
169174
{JSON.stringify(data)}
170175
</Text>
171-
) : (
172-
<Text type="secondary">-</Text>
173176
);
174177
},
175178
},

0 commit comments

Comments
 (0)