Fixing lint errors and renaming Pym file.

This commit is contained in:
David Jay
2017-01-24 13:23:42 -05:00
parent 0d7b482dc1
commit 90c58885aa
6 changed files with 15 additions and 16 deletions
@@ -1,6 +1,5 @@
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {compose} from 'react-apollo';
import {I18n} from '../../coral-framework';
import {updateOpenStatus, updateConfiguration} from '../../coral-framework/actions/config';
@@ -58,9 +57,10 @@ class ConfigureStreamContainer extends Component {
}
render () {
const {status, asset} = this.props;
const {status} = this.props;
// asset.closedAt === null
console.log(this.props.apollo.data)
console.log(this.props.apollo.data);
return (
<div>
<ConfigureCommentStream
+6 -7
View File
@@ -1,15 +1,15 @@
import React, {Component, PropTypes} from 'react';
import React, {Component} from 'react';
import {compose} from 'react-apollo';
import {connect} from 'react-redux';
import {isEqual} from 'lodash'
import {isEqual} from 'lodash';
import {TabBar, Tab, TabContent, Spinner} from '../../coral-ui';
const {logout, showSignInDialog} = authActions;
const {addNotification, clearNotification} = notificationActions;
const {fetchAssetSuccess} = assetActions
const {fetchAssetSuccess} = assetActions;
import pym from './Pym'
import pym from './PymConnection';
import {queryStream} from './graphql/queries';
import {postComment, postAction, deleteAction} from './graphql/mutations';
import {Notification, notificationActions, authActions, assetActions} from 'coral-framework';
@@ -83,15 +83,14 @@ class Embed extends Component {
}
componentWillReceiveProps (nextProps) {
const {loadAsset} = this.props
const {loadAsset} = this.props;
if(!isEqual(nextProps.data.asset, this.props.data.asset)) {
loadAsset(nextProps.data.asset)
loadAsset(nextProps.data.asset);
}
}
render () {
const {activeTab} = this.state;
const {dispatch} = this.props;
const {loading, asset, refetch} = this.props.data;
const {loggedIn, isAdmin, user, showSignInDialog, signInOffset} = this.props.auth;
@@ -1,6 +1,6 @@
import {graphql} from 'react-apollo';
import STREAM_QUERY from './streamQuery.graphql';
import pym from '../../Pym';
import pym from '../../PymConnection';
let url = pym.parentUrl.split('#')[0] || 'http://localhost:3000/';
+1 -1
View File
@@ -2,4 +2,4 @@ import * as actions from '../constants/asset';
export const fetchAssetRequest = () => ({type: actions.FETCH_ASSET_REQUEST});
export const fetchAssetSuccess = asset => ({type: actions.FETCH_ASSET_SUCCESS, asset});
export const fetchAssetFailure = error => ({type: actions.FETCH_ASSET_FAILURE, error})
export const fetchAssetFailure = error => ({type: actions.FETCH_ASSET_FAILURE, error});
+4 -4
View File
@@ -10,10 +10,10 @@ const initialState = Map({
export default function asset (state = initialState, action) {
switch (action.type) {
case actions.FETCH_ASSET_SUCCESS :
return state
case actions.FETCH_ASSET_SUCCESS :
return state
.merge(action.asset);
default :
return state;
default :
return state;
}
}