Skip to content

Commit 9367146

Browse files
committed
chore: biome check
1 parent 81fb636 commit 9367146

14 files changed

Lines changed: 598 additions & 587 deletions

src/api/auth.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ export const updateUser = async (name?: string, profileImageUrl?: string) => {
1616
return response.data as User;
1717
};
1818

19-
export const signup = async (
20-
email: string,
21-
password: string,
22-
) => {
19+
export const signup = async (email: string, password: string) => {
2320
const response = await api.post<AuthTokens>("/auth/register", {
2421
email,
2522
password,

src/api/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export const getInterestCategories = async () => {
2828
};
2929

3030
export const addInterestCategories = async (
31-
items: { categoryId: number; priority: number }[],
31+
items: { categoryId: number; priority: number }[],
3232
) => {
33-
return api.put("/users/me/interest-categories", { items });
33+
return api.put("/users/me/interest-categories", { items });
3434
};
3535

3636
export const removeInterestCategory = async (categoryId: number) => {

src/pages/auth/Home.module.css

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,116 @@
11
.page {
2-
min-height: 100vh;
3-
display: flex;
4-
justify-content: center;
5-
align-items: center;
6-
padding: 24px;
7-
background: #ffffff;
2+
min-height: 100vh;
3+
display: flex;
4+
justify-content: center;
5+
align-items: center;
6+
padding: 24px;
7+
background: #ffffff;
88
}
99

1010
.box {
11-
width: 100%;
12-
max-width: 520px;
13-
display: flex;
14-
flex-direction: column;
15-
align-items: center;
11+
width: 100%;
12+
max-width: 520px;
13+
display: flex;
14+
flex-direction: column;
15+
align-items: center;
1616
}
1717

1818
.brand {
19-
display: flex;
20-
align-items: center;
21-
justify-content: center;
22-
gap: 18px;
23-
margin-bottom: 54px;
19+
display: flex;
20+
align-items: center;
21+
justify-content: center;
22+
gap: 18px;
23+
margin-bottom: 54px;
2424
}
2525

2626
.logo {
27-
width: 88px;
28-
height: 88px;
29-
object-fit: contain;
30-
display: block;
27+
width: 88px;
28+
height: 88px;
29+
object-fit: contain;
30+
display: block;
3131
}
3232

3333
.title {
34-
margin: 0;
35-
font-size: 56px;
36-
line-height: 1;
37-
font-weight: 800;
38-
letter-spacing: -0.04em;
39-
color: #000;
34+
margin: 0;
35+
font-size: 56px;
36+
line-height: 1;
37+
font-weight: 800;
38+
letter-spacing: -0.04em;
39+
color: #000;
4040
}
4141

4242
.actions {
43-
width: 100%;
44-
display: flex;
45-
flex-direction: column;
46-
gap: 14px;
47-
align-items: center;
43+
width: 100%;
44+
display: flex;
45+
flex-direction: column;
46+
gap: 14px;
47+
align-items: center;
4848
}
4949

5050
.btn {
51-
width: min(440px, 100%);
52-
height: 48px;
53-
border-radius: 9999px;
54-
border: 1px solid #e6e6e6;
55-
background: #ffffff;
56-
color: #111111;
57-
font-size: 14px;
58-
font-weight: 600;
59-
letter-spacing: -0.01em;
60-
cursor: pointer;
61-
62-
display: inline-flex;
63-
align-items: center;
64-
justify-content: center;
65-
66-
box-shadow:
67-
0 2px 0 rgba(0, 0, 0, 0.04),
68-
0 6px 14px rgba(0, 0, 0, 0.06);
51+
width: min(440px, 100%);
52+
height: 48px;
53+
border-radius: 9999px;
54+
border: 1px solid #e6e6e6;
55+
background: #ffffff;
56+
color: #111111;
57+
font-size: 14px;
58+
font-weight: 600;
59+
letter-spacing: -0.01em;
60+
cursor: pointer;
61+
62+
display: inline-flex;
63+
align-items: center;
64+
justify-content: center;
65+
66+
box-shadow:
67+
0 2px 0 rgba(0, 0, 0, 0.04),
68+
0 6px 14px rgba(0, 0, 0, 0.06);
6969
}
7070

7171
.btn:active {
72-
transform: translateY(1px);
73-
box-shadow:
74-
0 1px 0 rgba(0, 0, 0, 0.04),
75-
0 3px 10px rgba(0, 0, 0, 0.06);
72+
transform: translateY(1px);
73+
box-shadow:
74+
0 1px 0 rgba(0, 0, 0, 0.04),
75+
0 3px 10px rgba(0, 0, 0, 0.06);
7676
}
7777

7878
.social {
79-
position: relative;
80-
justify-content: center;
81-
text-align: center;
79+
position: relative;
80+
justify-content: center;
81+
text-align: center;
8282
}
8383

8484
.social::before {
85-
content: "";
86-
position: absolute;
87-
left: 18px;
88-
width: 30px;
89-
height: 30px;
90-
border-radius: 9999px;
91-
background-size: contain;
92-
background-repeat: no-repeat;
93-
background-position: center;
85+
content: "";
86+
position: absolute;
87+
left: 18px;
88+
width: 30px;
89+
height: 30px;
90+
border-radius: 9999px;
91+
background-size: contain;
92+
background-repeat: no-repeat;
93+
background-position: center;
9494
}
9595

9696
.social[data-provider="google"]::before {
97-
background-image: url("/public/assets/googleLogo.png");
97+
background-image: url("/public/assets/googleLogo.png");
9898
}
9999

100100
.social[data-provider="kakao"]::before {
101-
background-image: url("/public/assets/kakaoLogo.png");
101+
background-image: url("/public/assets/kakaoLogo.png");
102102
}
103103

104104
.social[data-provider="naver"]::before {
105-
background-image: url("/public/assets/naverLogo.png");
105+
background-image: url("/public/assets/naverLogo.png");
106106
}
107107

108108
.primary {
109-
background: #ffcc00;
110-
border-color: transparent;
111-
color: #111111;
109+
background: #ffcc00;
110+
border-color: transparent;
111+
color: #111111;
112112
}
113113

114114
.primary:active {
115-
transform: translateY(1px);
115+
transform: translateY(1px);
116116
}

src/pages/auth/Home.tsx

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ import logo from "/assets/logo.png";
33
import styles from "./Home.module.css";
44

55
const {
6-
VITE_KAKAO_REST_API_KEY,
7-
VITE_KAKAO_REDIRECT_URI,
8-
VITE_GOOGLE_CLIENT_ID,
9-
VITE_GOOGLE_REDIRECT_URI,
10-
VITE_NAVER_CLIENT_ID,
11-
VITE_NAVER_REDIRECT_URI,
6+
VITE_KAKAO_REST_API_KEY,
7+
VITE_KAKAO_REDIRECT_URI,
8+
VITE_GOOGLE_CLIENT_ID,
9+
VITE_GOOGLE_REDIRECT_URI,
10+
VITE_NAVER_CLIENT_ID,
11+
VITE_NAVER_REDIRECT_URI,
1212
} = import.meta.env;
1313

1414
export default function Home() {
15-
const navigate = useNavigate();
15+
const navigate = useNavigate();
1616

17-
const toLogin = () => navigate("/auth/login");
18-
const toSignUp = () => navigate("/auth/signup");
17+
const toLogin = () => navigate("/auth/login");
18+
const toSignUp = () => navigate("/auth/signup");
1919

20-
const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${VITE_KAKAO_REST_API_KEY}&redirect_uri=${VITE_KAKAO_REDIRECT_URI}&response_type=code`;
20+
const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${VITE_KAKAO_REST_API_KEY}&redirect_uri=${VITE_KAKAO_REDIRECT_URI}&response_type=code`;
2121
const handleKakaoLogin = () => {
2222
window.location.href = kakaoURL;
2323
};
2424

25-
const googleURL = `https://accounts.google.com/o/oauth2/v2/auth?
25+
const googleURL = `https://accounts.google.com/o/oauth2/v2/auth?
2626
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile&
2727
include_granted_scopes=true&
2828
response_type=token&
@@ -33,62 +33,62 @@ export default function Home() {
3333
window.location.href = googleURL;
3434
};
3535

36-
const state = crypto.randomUUID();
37-
sessionStorage.setItem("naver_oauth_state", state);
38-
const naverURL = `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${VITE_NAVER_CLIENT_ID}&state=${state}&redirect_uri=${VITE_NAVER_REDIRECT_URI}`;
36+
const state = crypto.randomUUID();
37+
sessionStorage.setItem("naver_oauth_state", state);
38+
const naverURL = `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${VITE_NAVER_CLIENT_ID}&state=${state}&redirect_uri=${VITE_NAVER_REDIRECT_URI}`;
3939
const handleNaverLogin = () => {
4040
window.location.href = naverURL;
4141
};
4242

43-
return (
44-
<div className={styles.page}>
45-
<div className={styles.box}>
46-
<div className={styles.brand}>
47-
<img className={styles.logo} src={logo} alt="Logo" />
48-
<h1 className={styles.title}>행샤</h1>
49-
</div>
43+
return (
44+
<div className={styles.page}>
45+
<div className={styles.box}>
46+
<div className={styles.brand}>
47+
<img className={styles.logo} src={logo} alt="Logo" />
48+
<h1 className={styles.title}>행샤</h1>
49+
</div>
5050

51-
<div className={styles.actions}>
52-
<button className={styles.btn} type="button" onClick={toLogin}>
53-
로그인
54-
</button>
51+
<div className={styles.actions}>
52+
<button className={styles.btn} type="button" onClick={toLogin}>
53+
로그인
54+
</button>
5555

56-
<button
57-
className={`${styles.btn} ${styles.social}`}
58-
data-provider="google"
59-
type="button"
60-
onClick={handleGoogleLogin}
61-
>
62-
<span>구글 계정으로 계속하기</span>
63-
</button>
56+
<button
57+
className={`${styles.btn} ${styles.social}`}
58+
data-provider="google"
59+
type="button"
60+
onClick={handleGoogleLogin}
61+
>
62+
<span>구글 계정으로 계속하기</span>
63+
</button>
6464

65-
<button
66-
className={`${styles.btn} ${styles.social}`}
67-
data-provider="kakao"
68-
type="button"
69-
onClick={handleKakaoLogin}
70-
>
71-
<span>카카오톡 계정으로 계속하기</span>
72-
</button>
65+
<button
66+
className={`${styles.btn} ${styles.social}`}
67+
data-provider="kakao"
68+
type="button"
69+
onClick={handleKakaoLogin}
70+
>
71+
<span>카카오톡 계정으로 계속하기</span>
72+
</button>
7373

74-
<button
75-
className={`${styles.btn} ${styles.social}`}
76-
data-provider="naver"
77-
type="button"
78-
onClick={handleNaverLogin}
79-
>
80-
<span>네이버 계정으로 계속하기</span>
81-
</button>
74+
<button
75+
className={`${styles.btn} ${styles.social}`}
76+
data-provider="naver"
77+
type="button"
78+
onClick={handleNaverLogin}
79+
>
80+
<span>네이버 계정으로 계속하기</span>
81+
</button>
8282

83-
<button
84-
className={`${styles.btn} ${styles.primary}`}
85-
type="button"
86-
onClick={toSignUp}
87-
>
88-
회원가입
89-
</button>
90-
</div>
91-
</div>
92-
</div>
93-
);
83+
<button
84+
className={`${styles.btn} ${styles.primary}`}
85+
type="button"
86+
onClick={toSignUp}
87+
>
88+
회원가입
89+
</button>
90+
</div>
91+
</div>
92+
</div>
93+
);
9494
}

src/pages/auth/Login/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from "react";
2-
import { Link, useNavigate} from "react-router-dom";
2+
import { Link, useNavigate } from "react-router-dom";
33
import { login } from "../../../api/auth";
44
import "./Login.css";
55

0 commit comments

Comments
 (0)