bigbuffet-rw/app/soapbox/features/ui/containers/bundle-container.tsx

22 lines
543 B
TypeScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import { connect } from 'react-redux';
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) => ({
onFetch() {
2020-03-27 13:59:38 -07:00
dispatch(fetchBundleRequest());
},
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);