Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit 7a52e80

Browse files
committed
Rebases changes, improves styling
1 parent 239a25c commit 7a52e80

2 files changed

Lines changed: 46 additions & 36 deletions

File tree

client/src/components/ChannelInfo/index.css

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,42 @@
5656
overflow-y: auto;
5757
}
5858

59-
.channel-info-wrapper {
60-
height: -webkit-fill-available;
61-
}
62-
6359
.user-logged-out-message {
6460
font-size: 0.95em;
6561
color: #9a9ea4;
6662
line-height: 25px;
67-
}
63+
}
64+
65+
.online-users-grid {
66+
width: 100% !important;
67+
margin-bottom: 20px !important;
68+
}
69+
70+
.online-users-grid-item {
71+
display: flex;
72+
align-items: flex-start;
73+
position: relative;
74+
}
75+
76+
.online-status {
77+
width: 10px;
78+
height: 10px;
79+
z-index: 2;
80+
position: absolute;
81+
}
82+
83+
.online-user-avatar {
84+
width: 30px;
85+
z-index: 1;
86+
margin-left: 5px;
87+
}
88+
89+
.channel-member-grid {
90+
margin: 10px 0px !important;
91+
}
92+
93+
.channel-member-grid-item {
94+
display: flex;
95+
align-items: flex-start;
96+
position: relative;
97+
}

client/src/components/ChannelInfo/index.js

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)