bigbuffet-rw/app/soapbox/features/ui/containers/bundle_container.tsx
2022-08-31 17:28:19 -05:00

20 lines
543 B
TypeScript

import { connect } from 'react-redux';
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from '../../../actions/bundles';
import Bundle from '../components/bundle';
import type { AppDispatch } from 'soapbox/store';
const mapDispatchToProps = (dispatch: AppDispatch) => ({
onFetch() {
dispatch(fetchBundleRequest());
},
onFetchSuccess() {
dispatch(fetchBundleSuccess());
},
onFetchFail(error: any) {
dispatch(fetchBundleFail(error));
},
});
export default connect(null, mapDispatchToProps)(Bundle);