yardz commented on a change in pull request #13291:
URL: https://github.com/apache/superset/pull/13291#discussion_r580722651
##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
}
`;
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {
+ if ('dashboard_title' in e) return e.dashboard_title || UNTITLED;
+ if ('slice_name' in e) return e.slice_name || UNTITLED;
+ if ('label' in e) return e.label || UNTITLED;
+ return e.item_title || UNTITLED;
+};
+
+const getEntityIconName = (e: ActivityObject) => {
Review comment:
Same thing here (and for the other functions)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]