350 open graph react #360
3 changed files with 2 additions and 35 deletions
|
@ -12,35 +12,6 @@ import { call } from 'redux-saga/effects';
|
|||
import { handleShowPageUri } from '../react/sagas/show_uri';
|
||||
import { onHandleShowPageUri } from '../react/actions/show';
|
||||
|
||||
// const waitAll = (sagas) => {
|
||||
// console.log('sagas', sagas);
|
||||
// return function * () {
|
||||
// const tasks = yield sagas.map(([saga, params]) => {
|
||||
// console.log('saga to fork:', saga);
|
||||
// console.log('params fork:', params);
|
||||
// fork(saga, params);
|
||||
// });
|
||||
// console.log('tasks', tasks);
|
||||
// console.log('before join');
|
||||
// yield tasks.map(join);
|
||||
// console.log('after join');
|
||||
// };
|
||||
// };
|
||||
//
|
||||
// const getPreloaders = (req) => {
|
||||
// let preloaders = [];
|
||||
// routes.some(route => {
|
||||
// const match = matchPath(req.path, route);
|
||||
// if (match) {
|
||||
// let preloadData = route.component.preloadData;
|
||||
// if (preloadData instanceof Function) {
|
||||
// preloaders.push([preloadData(), mockAction(match.params)]);
|
||||
// };
|
||||
// };
|
||||
// });
|
||||
// return preloaders;
|
||||
// };
|
||||
|
||||
const returnSagaWithParams = (saga, params) => {
|
||||
return function * () {
|
||||
yield call(saga, params);
|
||||
|
@ -57,9 +28,8 @@ module.exports = (req, res) => {
|
|||
// create a new Redux store instance
|
||||
const store = createStore(Reducer, middleware);
|
||||
|
||||
// get params
|
||||
const action = onHandleShowPageUri(req.params);
|
||||
// create saga
|
||||
const action = onHandleShowPageUri(req.params);
|
||||
const saga = returnSagaWithParams(handleShowPageUri, action);
|
||||
|
||||
// run the saga middleware
|
||||
|
@ -84,7 +54,7 @@ module.exports = (req, res) => {
|
|||
console.log('REDIRECTING:', context.url);
|
||||
return res.redirect(301, context.url);
|
||||
} else {
|
||||
console.log(`we're good, send the response`, html);
|
||||
console.log(`we're good, send the response`);
|
||||
}
|
||||
|
||||
// get the initial state from our Redux store
|
||||
|
|
|
@ -26,7 +26,6 @@ export default function (state = initialState, action) {
|
|||
}),
|
||||
});
|
||||
case actions.REQUEST_UPDATE:
|
||||
console.log('REQUEST UPDATE');
|
||||
return Object.assign({}, state, {
|
||||
request: Object.assign({}, state.request, {
|
||||
type: action.data.requestType,
|
||||
|
|
|
@ -7,8 +7,6 @@ import lbryUri from 'utils/lbryUri';
|
|||
|
||||
function * parseAndUpdateIdentifierAndClaim (modifier, claim) {
|
||||
console.log('parseAndUpdateIdentifierAndClaim');
|
||||
console.log('modifier:', modifier);
|
||||
console.log('claim:', claim);
|
||||
// this is a request for an asset
|
||||
// claim will be an asset claim
|
||||
// the identifier could be a channel or a claim id
|
||||
|
|
Loading…
Reference in a new issue