Skip to content

Commit

Permalink
Modified avatar showing bug #29
Browse files Browse the repository at this point in the history
  • Loading branch information
Haaaan1 committed Apr 14, 2024
1 parent 440de70 commit 63f2e08
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/routing/routeProtectors/LobbyGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const LobbyGuard = () => {
return <Outlet />;
}
// Debugging
// return <Outlet />;
return <Navigate to="/login" replace />;
return <Outlet />;
//return <Navigate to="/login" replace />;
};

LobbyGuard.propTypes = {
Expand Down
9 changes: 4 additions & 5 deletions src/components/views/Lobby.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Player.propTypes = {

const mockRoomPlayers: User[] = [

{ id: 1, username: "Alice", avatar: "twa twa-smiling-face-with-smiling-eyes", name: "Alice Wonderland", status: "ONLINE", registerDate: new Date("2021-08-01"), birthday: new Date("1990-01-01") },
{ id: 2, username: "Bob", avatar: "https://twemoji.maxcdn.com/v/latest/72x72/1f602.png", name: "Bob Builder", status: "OFFLINE", registerDate: new Date("2021-09-01"), birthday: new Date("1985-02-02") },
{ id: 1, username: "Alice", avatar: "smiling-face-with-smiling-eyes", name: "Alice Wonderland", status: "ONLINE", registerDate: new Date("2021-08-01"), birthday: new Date("1990-01-01") },
{ id: 2, username: "Bob", avatar: "grinning-face-with-sweat", name: "Bob Builder", status: "OFFLINE", registerDate: new Date("2021-09-01"), birthday: new Date("1985-02-02") },

];

Expand Down Expand Up @@ -160,7 +160,7 @@ const Lobby = () => {
<div className="room-players">
{room.roomPlayersList?.map((user, index) => (
<div className="player" key={index}>
<img src={user.avatar} alt={user.name} className="player-avatar" />
<i className={"twa twa-" + user.avatar} style={{fontSize: "3.8rem"}}/>
<div className="name">{user.username}</div>
</div>
))}
Expand All @@ -183,8 +183,7 @@ const Lobby = () => {
return (
<BaseContainer>
<div className="user-container">
<i className={"twa twa-" + user.avatar} style={{fontSize: "3.8rem"}}/>
{/*<img src={user.avatar} alt={user.name} className="player-avatar" />*/}
<i className={"twa twa-" + user.avatar} style={{fontSize: "3.8rem", marginTop:"0.8rem"}}/>
<div className="name">{user.username}</div>
</div>
<div className="big-title">Kaeps</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/views/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const Login = () => {
disabled={!username || !password || username.trim() ===" " || password.trim() ===" "}
width="100%"
onClick={() => doLogin()}
style={{ color: "black"}}
>
Login
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/components/views/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const Register = () => {
disabled={!username || !password ||password.indexOf(" ") !== -1|| username.indexOf(" ") !== -1}
width="75%"
onClick={() => doRegister()}
style={{ color: "black"}}
>
register
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/styles/ui/BaseContainer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
padding-right: 15px;
max-width: $DESKTOP_WIDTH;
color: $textColor;
background-color: aqua;
}
2 changes: 1 addition & 1 deletion src/styles/views/Login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
padding-top: 30px;
padding-left: 37px;
padding-right: 37px;
background-color: $background;
background-color: #C9D7DD;
transition: opacity 0.5s ease, transform 0.5s ease;
box-shadow: $dropShadow;
border-radius: 1.5em;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/views/Register.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
padding-top: 30px;
padding-left: 37px;
padding-right: 37px;
background-color: $background;
background-color: #C9D7DD;
transition: opacity 0.5s ease, transform 0.5s ease;
box-shadow: $dropShadow;
border-radius: 1.5em;
Expand Down

0 comments on commit 63f2e08

Please sign in to comment.