lbry-desktop/ui/component/publishSettings/view.jsx
infiinte-persistence 16b1605a35 Add SETTINGS.ENABLE_PUBLISH_PREVIEW
This option allows users to bypass the "publish preview" modal. Users can disable it by checking "don't show this again" in the modal, and re-enable it in the Settings Page.
2020-10-02 10:25:17 -04:00

32 lines
706 B
JavaScript

// @flow
import React from 'react';
import { FormField } from 'component/common/form';
import { withRouter } from 'react-router';
type Props = {
enablePublishPreview: boolean,
setEnablePublishPreview: boolean => void,
};
function PublishSettings(props: Props) {
const { enablePublishPreview, setEnablePublishPreview } = props;
function handleChange() {
setEnablePublishPreview(!enablePublishPreview);
}
return (
<div>
<FormField
type="checkbox"
name="sync_toggle"
label={__('Skip preview and confirmation')}
checked={!enablePublishPreview}
onChange={handleChange}
/>
</div>
);
}
export default withRouter(PublishSettings);