@@ -74,18 +74,18 @@ export default function ChannelInfo(props) {
7474 const repository = props . location . pathname
7575 . split ( "/" ) [ 2 ]
7676 . replace ( "_" , "/" ) ;
77- const ghHeaders = {
77+ const headers = {
7878 accept : "application/json" ,
7979 } ;
8080 if ( Cookies . get ( "gh_private_repo_token" ) ) {
81- ghHeaders [ "Authorization" ] = `token ${ Cookies . get (
81+ headers [ "Authorization" ] = `token ${ Cookies . get (
8282 "gh_private_repo_token"
8383 ) } `;
8484 }
8585 const ghRepoInfoResponse = await axios ( {
8686 method : "get" ,
8787 url : `${ githubApiDomain } /repos/${ repository } ` ,
88- headers : ghHeaders ,
88+ headers : headers ,
8989 } ) ;
9090 const ghIssuesResponse = await axios ( {
9191 method : "get" ,
@@ -104,7 +104,7 @@ export default function ChannelInfo(props) {
104104 }
105105 } ;
106106
107- const channelMembers = async ( ) => {
107+ const fetchChannelMembers = async ( ) => {
108108 try {
109109 // Fetches channel members
110110 const channelMembersResponse = await axios ( {
@@ -125,7 +125,7 @@ export default function ChannelInfo(props) {
125125 }
126126 } ;
127127 ghRepoInfo ( ) ;
128- channelMembers ( ) ;
128+ fetchChannelMembers ( ) ;
129129 } , [ props . location . pathname ] ) ;
130130
131131 const [ activeTab , setActiveTab ] = useState ( 0 ) ;
@@ -167,7 +167,7 @@ export default function ChannelInfo(props) {
167167 < div className = "channel-info-wrapper" >
168168 { ! isLoggedOut ? (
169169 < >
170- < Grid container spacing = { 2 } style = { { marginBottom : "20px" } } >
170+ < Grid container spacing = { 2 } className = "online-users-grid" >
171171 { channelMembers
172172 . filter (
173173 ( user , index ) => user . status === "online" && index <= 25
@@ -178,27 +178,11 @@ export default function ChannelInfo(props) {
178178 key = { user . username }
179179 item
180180 xs = { 2 }
181- style = { {
182- display : "flex" ,
183- alignItems : "flex-start" ,
184- position : "relative" ,
185- } }
181+ className = "online-users-grid-item"
186182 >
183+ < img className = "online-status" src = { online } />
187184 < img
188- style = { {
189- width : "10px" ,
190- height : "10px" ,
191- zIndex : "2" ,
192- position : "absolute" ,
193- } }
194- src = { online }
195- />
196- < img
197- style = { {
198- width : "30px" ,
199- zIndex : "1" ,
200- marginLeft : "5px" ,
201- } }
185+ className = "online-user-avatar"
202186 src = { `${ rcApiDomain } /avatar/${ user . username } ` }
203187 />
204188 </ Grid >
@@ -293,18 +277,14 @@ export default function ChannelInfo(props) {
293277 >
294278 < DialogTitle > Channel Members</ DialogTitle >
295279 < DialogContent >
296- < Grid container spacing = { 2 } style = { { margin : "10px 0px" } } >
280+ < Grid container spacing = { 2 } className = "channel-member-grid" >
297281 { channelMembers . map ( ( user ) => {
298282 return (
299283 < Grid
300284 key = { user . username }
301285 item
302286 md = { 4 }
303- style = { {
304- display : "flex" ,
305- alignItems : "flex-start" ,
306- position : "relative" ,
307- } }
287+ className = "channel-member-grid-item"
308288 >
309289 < img
310290 style = { { width : "30px" } }
0 commit comments