Redux #115
2 changed files with 22 additions and 5 deletions
17
ui/js/page/publish/index.js
Normal file
17
ui/js/page/publish/index.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import React from 'react'
|
||||||
|
import {
|
||||||
|
connect,
|
||||||
|
} from 'react-redux'
|
||||||
|
import {
|
||||||
|
doNavigate,
|
||||||
|
} from 'actions/app'
|
||||||
|
import PublishPage from './view'
|
||||||
|
|
||||||
|
const select = (state) => ({
|
||||||
|
})
|
||||||
|
|
||||||
|
const perform = (dispatch) => ({
|
||||||
|
navigate: (path) => dispatch(doNavigate(path)),
|
||||||
|
})
|
||||||
|
|
||||||
|
export default connect(select, perform)(PublishPage)
|
|
@ -1,9 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import lbry from '../lbry.js';
|
import lbry from 'lbry';
|
||||||
import FormField from '../component/form.js';
|
import {FormField, FormRow} from 'component/form.js';
|
||||||
import Link from 'component/link';
|
import Link from 'component/link';
|
||||||
import rewards from '../rewards.js';
|
import rewards from 'rewards';
|
||||||
import Modal from '../component/modal.js';
|
import Modal from 'component/modal';
|
||||||
|
|
||||||
var PublishPage = React.createClass({
|
var PublishPage = React.createClass({
|
||||||
_requiredFields: ['meta_title', 'name', 'bid', 'tos_agree'],
|
_requiredFields: ['meta_title', 'name', 'bid', 'tos_agree'],
|
||||||
|
@ -147,7 +147,7 @@ var PublishPage = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlePublishStartedConfirmed: function() {
|
handlePublishStartedConfirmed: function() {
|
||||||
window.location.href = "?published";
|
this.props.navigate('published')
|
||||||
},
|
},
|
||||||
handlePublishError: function(error) {
|
handlePublishError: function(error) {
|
||||||
this.setState({
|
this.setState({
|
Loading…
Reference in a new issue