yardz commented on a change in pull request #13291:
URL: https://github.com/apache/superset/pull/13291#discussion_r580723212



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -23,25 +23,43 @@ import { styled, t } from '@superset-ui/core';
 import Loading from 'src/components/Loading';
 import ListViewCard from 'src/components/ListViewCard';
 import SubMenu from 'src/components/Menu/SubMenu';
+import { Chart } from 'src/types/Chart';
+import { Dashboard, SavedQueryObject } from 'src/views/CRUD/types';
+import { mq, CardStyles } from 'src/views/CRUD/utils';
+
 import { ActivityData } from './Welcome';
-import { mq, CardStyles } from '../utils';
 import EmptyState from './EmptyState';
 
-interface ActivityObjects {
-  action?: string;
-  item_title?: string;
-  slice_name: string;
-  time: string;
-  changed_on_utc: string;
-  url: string;
-  sql: string;
-  dashboard_title: string;
-  label: string;
-  id: string;
-  table: object;
+/**
+ * Return result from /superset/recent_activity/{user_id}
+ */
+interface RecentActivity {
+  action: string;
+  item_type: 'slice' | 'dashboard';
   item_url: string;
+  item_title: string;
+  time: number;
+  time_delta_humanized?: string;
+}
+
+interface RecentSlice extends RecentActivity {
+  item_type: 'slice';
+}
+
+interface RecentDashboard extends RecentActivity {
+  item_type: 'dashboard';
 }
 
+/**
+ * Recent activity objects fetched by `getRecentAcitivtyObjs`.
+ */
+type ActivityObject =

Review comment:
       @ktmud Are you sure it's just these types?




----------------------------------------------------------------
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]

Reply via email to