2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
2022-11-12 06:18:24 -08:00
|
|
|
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from 'soapbox/actions/bundles';
|
|
|
|
|
2020-03-27 13:59:38 -07:00
|
|
|
import Bundle from '../components/bundle';
|
|
|
|
|
2022-08-31 15:22:37 -07:00
|
|
|
import type { AppDispatch } from 'soapbox/store';
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch: AppDispatch) => ({
|
2020-04-14 14:47:35 -07:00
|
|
|
onFetch() {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(fetchBundleRequest());
|
|
|
|
},
|
2020-04-14 14:47:35 -07:00
|
|
|
onFetchSuccess() {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(fetchBundleSuccess());
|
|
|
|
},
|
2022-08-31 15:22:37 -07:00
|
|
|
onFetchFail(error: any) {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(fetchBundleFail(error));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(Bundle);
|