Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
derrrobin committed Jun 13, 2024
2 parents 2c7c5d1 + fb68364 commit 1c43b42
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
4 changes: 4 additions & 0 deletions frontend/src/components/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function Home() {
setUsername(data);
};

if (username === "") {
localStorage.removeItem("token");
}

const emptyusername = () => {
setUsername("");
};
Expand Down
18 changes: 18 additions & 0 deletions frontend/src/components/Login/Login.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
background-color: #0000000c;
}

.close-container {
margin-right: 10px; /* Moves the button 10px to the left */
}

.outer {
display: flex;
justify-content: center;
Expand Down Expand Up @@ -73,6 +77,20 @@
font-size: 36px;
cursor: pointer;
}
.header-container {
display: flex; /* Keeps flexbox layout */
align-items: center; /* Keeps items vertically centered */
justify-content: flex-start; /* Aligns items to the start, giving more control over spacing */
place-items: 10%;
width: 100%; /* Keeps the container spanning the full width */
}

.header-container h1 {
margin: 0; /* Keeps default margin removed from h1 */
flex-grow: 1; /* Allows the text to take up available space */
}



.wrapper .input-box {
position: relative;
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/components/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ const Login: React.FC<LoginProps> = ({ onToggleLogin, onData }) => {
return (
<div className="outer">
<div className="wrapper" id="divOne">
<h1>
{ueberschrift}
<IoClose size={35} className="btnclose" onClick={onToggleLogin} />
</h1>
<div className="header-container">
<h1>{ueberschrift}</h1>
<div className="close-container">
<IoClose size={35} className="btnclose" onClick={onToggleLogin} />
</div>
</div>
<div className="input-box">
<input type="text" placeholder=" Username" onChange={(e) => setUsername(e.target.value)} />
<img src={icon_user} alt="User" />
Expand Down

0 comments on commit 1c43b42

Please sign in to comment.