Skip to content

Commit 2a17e77

Browse files
committed
added username render to RoomsContainer
1 parent df4900f commit 2a17e77

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

app/src/components/left/HTMLItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const HTMLItem: React.FC<{
129129
className={`${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`}
130130
id="HTMLItem"
131131
>
132-
<Icon fontSize="small" align-items="center" />
132+
{/* <Icon fontSize="small" align-items="center" /> */}
133133
{name}
134134
</div>
135135
)}

app/src/components/left/RoomsContainer.tsx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,27 +159,15 @@ const RoomsContainer = () => {
159159
>
160160
{' '}
161161
{/* live room display */}
162-
<Typography variant="h5" color={'white'}>
162+
<Typography variant="h5" color={'#f2fbf8'}>
163163
Live Room: {roomCode}
164164
</Typography>
165+
<Typography variant="h6" color={'#70d8be'}>
166+
Nickname: {userName}
167+
</Typography>
165168
{/* Set up condition rendering depends on if user joined a room then render leave button if not render join button */}
166169
{userJoined ? (
167170
<>
168-
<Button
169-
variant="contained"
170-
onClick={() => leaveRoom()}
171-
sx={{
172-
backgroundColor: '#f2fbf8',
173-
color: '#092a26',
174-
'&:hover': {
175-
backgroundColor: '#a5ead6',
176-
borderColor: '#0062cc'
177-
}
178-
}}
179-
>
180-
{' '}
181-
Leave Room{' '}
182-
</Button>
183171
<Typography
184172
variant="body1"
185173
sx={{
@@ -231,6 +219,21 @@ const RoomsContainer = () => {
231219
))}
232220
</List>
233221
</Box>
222+
<Button
223+
variant="contained"
224+
onClick={() => leaveRoom()}
225+
sx={{
226+
backgroundColor: '#f2fbf8',
227+
color: '#092a26',
228+
'&:hover': {
229+
backgroundColor: '#a5ead6',
230+
borderColor: '#0062cc'
231+
}
232+
}}
233+
>
234+
{' '}
235+
Leave Room{' '}
236+
</Button>
234237
</>
235238
) : (
236239
//after joinning room

0 commit comments

Comments
 (0)