lbry-desktop/ui/component/publishFormErrors/index.js
infinite-persistence 364db9dafa Propagate thumbnail errors to PublishFormData
Thumbnail errors were just being used in `selectThumbnail`. The form doesn't know about it and was using allowing invalid thumbnails like 'helloworld' to pass through.
2021-04-26 12:24:19 -04:00

17 lines
777 B
JavaScript

import { connect } from 'react-redux';
import { makeSelectPublishFormValue, selectIsStillEditing } from 'lbry-redux';
import PublishPage from './view';
const select = (state) => ({
bid: makeSelectPublishFormValue('bid')(state),
name: makeSelectPublishFormValue('name')(state),
title: makeSelectPublishFormValue('title')(state),
bidError: makeSelectPublishFormValue('bidError')(state),
editingURI: makeSelectPublishFormValue('editingURI')(state),
uploadThumbnailStatus: makeSelectPublishFormValue('uploadThumbnailStatus')(state),
thumbnail: makeSelectPublishFormValue('thumbnail')(state),
thumbnailError: makeSelectPublishFormValue('thumbnailError')(state),
isStillEditing: selectIsStillEditing(state),
});
export default connect(select, null)(PublishPage);