@@ -86,48 +86,72 @@ class SingleUser extends Component {
8686 } = this . state ;
8787 const signedInUser = this . props . signedInUser ;
8888 const userId = this . props . match . params . uid ;
89-
89+
9090 return loading ? (
91- < CircularLoad color = { `secondary` } size = { 100 } />
91+ < CircularLoad color = { `secondary` } size = { 100 } />
9292 ) : (
93- < div className = "text-align-center" >
94- < img src = { user . photoURL } className = "margin-top-5" />
95- < h1 > { user . displayName } </ h1 >
96- { signedInUser . uid === userId ? (
97- < div />
98- ) : (
99- < Follow followerId = { signedInUser . uid } followingId = { userId } />
100- ) }
101- < Link to = { `/followers/${ userId } ` } >
102- < h2 >
103- Followers: < Count of = { this . followers } />
104- </ h2 >
105- </ Link >
106- < Link to = { `/following/${ userId } ` } >
107- < h2 >
108- Following: < Count of = { this . following } />
109- </ h2 >
110- </ Link >
111-
112- < div className = "text-align-center" >
113- < h2 >
114- Maps Created: < Count of = { this . mapsCreated } />
115- </ h2 >
93+ < div className = "single-user-flex" >
94+ < div className = "map-container" >
95+ < div className = "map-flex-outer" >
11696 { Object . keys ( createdMaps ) . length &&
11797 Object . keys ( createdMaps ) . map ( mapId => {
11898 return (
119- < Link to = { `/map/${ mapId } ` } key = { mapId } >
99+ < div className = "map-flex" >
100+ < div className = "map-flex-inner map-flex-color" >
101+ < Link to = { `/map/${ mapId } ` } key = { mapId } >
102+ < p >
103+ { createdMaps [ mapId ] . title } (< Count
104+ of = { db
105+ . collection ( "favoritedMaps" )
106+ . where ( "mapId" , "==" , mapId ) }
107+ /> Pins)
108+ </ p >
109+ </ Link >
110+ </ div >
111+ </ div >
112+ ) ;
113+ } ) }
114+ </ div >
115+ </ div >
116+ { signedInUser . uid === userId ? (
117+ < div />
118+ ) :
119+ < div className = "single-user-info-flex map-container" >
120+ < div className = "text-align-center" >
121+ < img src = { user . photoURL } />
122+ < h1 > { user . displayName } </ h1 >
123+ < div className = "follow-flex" >
124+ < div className = "follow-flex-inner" >
125+ < Link to = { `/followers/${ userId } ` } >
120126 < p >
121- { createdMaps [ mapId ] . title } (< Count
122- of = { db
123- . collection ( "favoritedMaps" )
124- . where ( "mapId" , "==" , mapId ) }
125- /> )
127+ Followers
128+ </ p >
129+ < p >
130+ < Count of = { this . followers } />
126131 </ p >
127132 </ Link >
128- ) ;
129- } ) }
133+ </ div >
134+ < div className = "follow-flex-inner" >
135+ < Link to = { `/following/${ userId } ` } >
136+ < p >
137+ Following
138+ </ p >
139+ < p >
140+ < Count of = { this . following } />
141+ </ p >
142+ </ Link >
143+ </ div >
144+ < div className = "follow-flex-inner" >
145+ < Link to = { `/` } > < p > Maps </ p >
146+ < p > < Count of = { this . mapsCreated } /> </ p >
147+ </ Link >
148+ </ div >
149+ </ div >
150+ < Follow followerId = { signedInUser . uid } followingId = { userId } />
151+ </ div >
152+
130153 </ div >
154+ }
131155 </ div >
132156 ) ;
133157 }
0 commit comments