mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
refactor: recentActions ajax call is redundant (#2722)
This commit is contained in:
parent
a6e1e18244
commit
55d3b012e5
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import $ from 'jquery';
|
||||
|
||||
import TableLoader from './TableLoader';
|
||||
|
||||
@ -10,18 +9,6 @@ const propTypes = {
|
||||
};
|
||||
|
||||
export default class RecentActivity extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
recentActions: [],
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
$.get(`/superset/recent_activity/${this.props.user.userId}/`, (data) => {
|
||||
this.setState({ recentActions: data });
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const mutator = function (data) {
|
||||
return data.map(row => ({
|
||||
|
Loading…
Reference in New Issue
Block a user