Skip to content

Commit

Permalink
fix(other): column name in created content on profile page (#17029)
Browse files Browse the repository at this point in the history
* fix: fix name in created content on profile page

* add more fix on mutater

(cherry picked from commit f2d41dc)
  • Loading branch information
jinghua-qa authored and eschutho committed Nov 23, 2021
1 parent 5899ae1 commit b4f4f4c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions superset-frontend/src/profile/components/CreatedContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ class CreatedContent extends React.PureComponent<CreatedContentProps> {
const mutator = (data: Slice[]) =>
data.map(slice => ({
slice: <a href={slice.url}>{slice.title}</a>,
favorited: moment.utc(slice.dttm).fromNow(),
_favorited: slice.dttm,
created: moment.utc(slice.dttm).fromNow(),
_created: slice.dttm,
}));
return (
<TableLoader
dataEndpoint={`/superset/created_slices/${this.props.user.userId}/`}
className="table-condensed"
columns={['slice', 'favorited']}
columns={['slice', 'created']}
mutator={mutator}
noDataText={t('No charts')}
sortable
Expand All @@ -52,16 +52,16 @@ class CreatedContent extends React.PureComponent<CreatedContentProps> {
const mutator = (data: Dashboard[]) =>
data.map(dash => ({
dashboard: <a href={dash.url}>{dash.title}</a>,
favorited: moment.utc(dash.dttm).fromNow(),
_favorited: dash.dttm,
created: moment.utc(dash.dttm).fromNow(),
_created: dash.dttm,
}));
return (
<TableLoader
className="table-condensed"
mutator={mutator}
dataEndpoint={`/superset/created_dashboards/${this.props.user.userId}/`}
noDataText={t('No dashboards')}
columns={['dashboard', 'favorited']}
columns={['dashboard', 'created']}
sortable
/>
);
Expand Down

0 comments on commit b4f4f4c

Please sign in to comment.