mirror of
https://github.com/strapi/strapi.git
synced 2025-08-12 02:38:21 +00:00

Created OLD folder. Fix load plugin when no Initializer is provided. Signed-off-by: soupette <cyril.lpz@gmail.com>
29 lines
498 B
JavaScript
29 lines
498 B
JavaScript
/**
|
|
*
|
|
* Initializer
|
|
*
|
|
*/
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import pluginId from '../../pluginId';
|
|
|
|
class Initializer extends React.PureComponent {
|
|
// eslint-disable-line react/prefer-stateless-function
|
|
componentDidMount() {
|
|
// Emit the event 'pluginReady'
|
|
this.props.updatePlugin(pluginId, 'isReady', true);
|
|
}
|
|
|
|
render() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
Initializer.propTypes = {
|
|
updatePlugin: PropTypes.func.isRequired,
|
|
};
|
|
|
|
export default Initializer;
|