File tree Expand file tree Collapse file tree 6 files changed +20
-3
lines changed Expand file tree Collapse file tree 6 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1616 "gulp-server-livereload" : " ^1.3.0" ,
1717 "gulp-util" : " ^3.0.4" ,
1818 "gulp-watch" : " ^4.2.4" ,
19+ "lodash" : " ^3.10.0" ,
1920 "node-notifier" : " ^4.2.1" ,
2021 "react" : " ^0.13.3" ,
2122 "react-router" : " ^1.0.0-beta2" ,
Original file line number Diff line number Diff line change 1+ .image-preview {
2+ display : inline-block ;
3+
4+ img {
5+ height : 200px ;
6+ width : 200px ;
7+ display : inline-block ;
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ .topic {
2+ text-align : center ;
3+ }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var React = require('react');
22
33module . exports = React . createClass ( {
44 render : function ( ) {
5- return < div >
5+ return < div className = "image-preview" >
66 { this . image ( ) }
77 </ div >
88 } ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ module.exports = React.createClass({
2020 Actions . getImages ( nextProps . params . id ) ;
2121 } ,
2222 render : function ( ) {
23- return < div >
23+ return < div className = "topic" >
2424 { this . renderImages ( ) }
2525 </ div >
2626 } ,
Original file line number Diff line number Diff line change 11var Reflux = require ( 'reflux' ) ;
22var Api = require ( '../utils/api' ) ;
33var Actions = require ( '../actions' ) ;
4+ var _ = require ( 'lodash' ) ;
45
56module . exports = Reflux . createStore ( {
67 listenables : [ Actions ] ,
78 getImages : function ( topicId ) {
89 Api . get ( 'topics/' + topicId )
910 . then ( function ( json ) {
10- this . images = json . data ;
11+ this . images = _ . reject ( json . data , function ( image ) {
12+ return image . is_album
13+ } ) ;
14+
1115 this . triggerChange ( ) ;
1216 } . bind ( this ) ) ;
1317 } ,
You can’t perform that action at this time.
0 commit comments