Skip to content

Commit 1b8b96b

Browse files
committed
Remove unused styling for register page and fix register page ui
1 parent e17dd20 commit 1b8b96b

File tree

4 files changed

+35
-73
lines changed

4 files changed

+35
-73
lines changed

apps/frontend/src/app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type InputFields = {
1515
password: string;
1616
};
1717

18-
export default function Home() {
18+
export default function LoginPage() {
1919
const [isLoginFailed, setIsLoginFailed] = useState(false);
2020
const router = useRouter();
2121
const [messageApi, contextHolder] = message.useMessage();

apps/frontend/src/app/login/styles.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
background: white;
77
}
88

9-
.content-card {
10-
margin: 4rem 8rem;
11-
padding: 2rem 4rem;
12-
background-color: white;
13-
min-height: 100vh;
14-
border-radius: 30px;
15-
box-shadow: 0px 10px 60px rgba(226, 236, 249, 0.5);
16-
}
17-
189
.login-card {
1910
/* Rectangle 6698 */
2011
margin: 8rem auto;

apps/frontend/src/app/register/page.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Link from "next/link";
77
import { createUser } from "@/app/services/user";
88
import { useRouter } from "next/navigation";
99
import NoAuthHeader from "@/components/NoAuthHeader/NoAuthHeader";
10+
import { UserOutlined } from "@ant-design/icons";
1011

1112
type InputFields = {
1213
username: string;
@@ -15,7 +16,7 @@ type InputFields = {
1516
confirmPassword: string;
1617
};
1718

18-
export default function Home() {
19+
export default function RegisterPage() {
1920
const [isRegistrationFailed, setIsRegistrationFailed] = useState(false);
2021
const router = useRouter();
2122
const [messageApi, contextHolder] = message.useMessage();
@@ -41,10 +42,10 @@ export default function Home() {
4142
return (
4243
<>
4344
{contextHolder}
44-
<Layout>
45+
<Layout className="layout">
4546
<NoAuthHeader />
46-
<Content>
47-
<div className="login-card">
47+
<Content className="content">
48+
<div className="register-card">
4849
<h1>Register</h1>
4950

5051
<Form
@@ -128,14 +129,23 @@ export default function Home() {
128129
</div>
129130

130131
<Form.Item>
131-
<Button type="primary" htmlType="submit">
132+
<Button
133+
type="primary"
134+
htmlType="submit"
135+
className="register-button"
136+
>
132137
Register
133138
</Button>
134139
</Form.Item>
135140
</Form>
136-
<p>
137-
Let me <Link href="/login">login</Link>
138-
</p>
141+
<div>
142+
<p className="login-text">
143+
Existing user?{" "}
144+
<Link href="/login" className="login-account-link">
145+
Login Here
146+
</Link>
147+
</p>
148+
</div>
139149
</div>
140150
</Content>
141151
</Layout>

apps/frontend/src/app/register/styles.scss

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,14 @@
66
background: white;
77
}
88

9-
.content-card {
10-
margin: 4rem 8rem;
11-
padding: 2rem 4rem;
12-
background-color: white;
13-
min-height: 100vh;
14-
border-radius: 30px;
15-
box-shadow: 0px 10px 60px rgba(226, 236, 249, 0.5);
16-
}
17-
18-
.login-card {
9+
.register-card {
1910
/* Rectangle 6698 */
20-
margin: 4rem auto;
21-
padding: 2rem 4rem;
11+
margin: 6rem auto;
12+
padding: 2rem 3rem;
2213
box-sizing: border-box;
23-
max-width: 30rem;
24-
background: #FFFFFF;
25-
border: 2px solid #8A817C;
14+
max-width: 26rem;
15+
background: #ffffff;
16+
border: 2px solid #8a817c;
2617
box-shadow: 3px 4px 4px rgba(0, 0, 0, 0.25);
2718
border-radius: 15px;
2819
}
@@ -32,50 +23,20 @@
3223
font-size: 13px;
3324
}
3425

35-
.content-row-1 {
36-
display: flex;
37-
flex-direction: row;
38-
justify-content: space-between;
39-
}
40-
41-
.content-title {
42-
// font-family: "Poppins";
43-
// font-style: normal;
44-
font-weight: 600;
45-
font-size: 22px;
46-
line-height: 33px;
47-
letter-spacing: -0.01em;
48-
color: #000000;
49-
}
50-
51-
.content-filter {
52-
margin: 1.5rem 0;
53-
}
54-
55-
.edit-button {
56-
margin-right: 0.5rem;
26+
.register-button {
27+
width: 100%;
5728
}
5829

59-
.filter-button {
60-
margin-left: 8px;
61-
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02) !important;
30+
.login-text {
31+
color: #bcb8b1;
32+
margin: auto;
33+
text-align: center;
6234
}
6335

64-
.clear-button {
65-
width: 100%;
36+
.login-account-link {
37+
color: #8a817c;
6638
}
6739

68-
.categories-multi-select,
69-
.difficulty-select,
70-
.order-select {
71-
width: 100%;
72-
}
73-
74-
.create-title,
75-
.new-problem-categories-multi-select,
76-
.new-problem-difficulty-select,
77-
.create-description,
78-
.create-problem-id {
79-
width: 100%;
80-
margin: 5px;
40+
.login-account-link:hover {
41+
color: #463f3a;
8142
}

0 commit comments

Comments
 (0)