Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

Commit dca18d4

Browse files
committed
Fixed Bug UI bug and center auth form.
1 parent 40cc2e2 commit dca18d4

7 files changed

Lines changed: 19 additions & 7 deletions

File tree

src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Authentication from './routes/Authentication.tsx';
33
import Dashboard from './routes/Dashboard.tsx';
44
import { useState } from 'react';
55
import { UserState } from './types.ts';
6+
import './scss/app.scss';
67

78
function App() {
89
// track the username in state

src/components/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const Login = ({ setUser, setLoggingIn }: SignupProps) => {
6565
required
6666
/>
6767
{loginFail ? (
68-
<p className='auth-cofinfirm'>Username or password incorrect</p>
68+
<p className='auth-confirm'>Username or password incorrect</p>
6969
) : null}
7070
<button className='auth-submit' type='submit'>
7171
Login

src/main.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import './scss/app.scss';
77
ReactDOM.createRoot(document.getElementById('root')!).render(
88
<React.StrictMode>
99
<BrowserRouter>
10-
<div className='app'>
1110
<App />
12-
</div>
1311
</BrowserRouter>
1412
</React.StrictMode>
1513
);

src/scss/app.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ body {
1111
#root {
1212
height: 100%;
1313
}
14+
15+
.authContainer {
16+
display: flex;
17+
flex-direction: column;
18+
justify-content: center;
19+
text-align: center;
20+
position: relative;
21+
}

src/scss/authContainer.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.title {
22
font-size: 32px;
33
color: goldenrod;
4-
font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
5-
"Lucida Sans", Arial, sans-serif;
4+
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',
5+
'Lucida Sans', Arial, sans-serif;
66
}
77

88
.title-wrapper {
@@ -14,7 +14,10 @@
1414
align-items: center;
1515
justify-content: center;
1616
width: 300px; /* Adjust width as needed */
17-
margin: auto; /* Center horizontally */
17+
position: absolute;
18+
top: 40%;
19+
left: 50%;
20+
transform: translate(-50%, -50%);
1821
padding: 20px;
1922
border: 2px solid black;
2023
border-radius: 8px;

src/scss/authWrapper.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
padding: 8px;
1414
width: 100%;
1515
box-sizing: border-box;
16+
border: 2px solid black;
17+
border-radius: 5px;
1618
}
1719
.auth-label {
1820
margin-bottom: 10px; /* Add margin between labels and inputs */

src/scss/leftContainer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
flex-direction: column;
3838
justify-content: space-between;
3939
align-items: center;
40-
max-height: 450px;
40+
max-height: 90%;
4141
overflow-y: auto;
4242
margin-top: 20px;
4343
}

0 commit comments

Comments
 (0)