From b4f4f4cdfa8a6d1a1b1a173593a812bf92a2c43f Mon Sep 17 00:00:00 2001 From: jinghua-qa <81597121+jinghua-qa@users.noreply.github.com> Date: Mon, 11 Oct 2021 08:21:05 -0700 Subject: [PATCH] fix(other): column name in created content on profile page (#17029) * fix: fix name in created content on profile page * add more fix on mutater (cherry picked from commit f2d41dc416da9daf7b4e51487a9c07bf06ba21d7) --- .../src/profile/components/CreatedContent.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/profile/components/CreatedContent.tsx b/superset-frontend/src/profile/components/CreatedContent.tsx index 41f21d6edbff..b097dee5e144 100644 --- a/superset-frontend/src/profile/components/CreatedContent.tsx +++ b/superset-frontend/src/profile/components/CreatedContent.tsx @@ -33,14 +33,14 @@ class CreatedContent extends React.PureComponent { const mutator = (data: Slice[]) => data.map(slice => ({ slice: {slice.title}, - favorited: moment.utc(slice.dttm).fromNow(), - _favorited: slice.dttm, + created: moment.utc(slice.dttm).fromNow(), + _created: slice.dttm, })); return ( { const mutator = (data: Dashboard[]) => data.map(dash => ({ dashboard: {dash.title}, - favorited: moment.utc(dash.dttm).fromNow(), - _favorited: dash.dttm, + created: moment.utc(dash.dttm).fromNow(), + _created: dash.dttm, })); return ( { mutator={mutator} dataEndpoint={`/superset/created_dashboards/${this.props.user.userId}/`} noDataText={t('No dashboards')} - columns={['dashboard', 'favorited']} + columns={['dashboard', 'created']} sortable /> );