pleroma/app/soapbox/features/ui/containers/bundle_container.tsx
marcin mikołajczak c76639c42e JS -> TS, FC
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-11-12 15:18:24 +01:00

21 lines
543 B
TypeScript

import { connect } from 'react-redux';
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from 'soapbox/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);