Skip to content

Commit 05b9fc7

Browse files
committed
fix: 충돌 해결
2 parents 0b19f5d + 92aeb3f commit 05b9fc7

39 files changed

+742
-179
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>SEEAT</title>
88
</head>
99
<body>
1010
<div id="root"></div>

package-lock.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
},
1212
"dependencies": {
1313
"@faker-js/faker": "^9.9.0",
14+
"@tanstack/react-query": "^5.84.1",
15+
"@tanstack/react-query-devtools": "^5.84.1",
1416
"axios": "^1.11.0",
1517
"clsx": "^2.1.1",
1618
"react": "^19.1.0",

public/favicon.png

5.36 KB
Loading

public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/App.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
import { QueryClientProvider } from '@tanstack/react-query';
12
import { RouterProvider } from 'react-router-dom';
3+
import { queryClient } from './libs/queryClient';
24
import router from '@/routes/route';
35
import ToastProvider from './components/common/Toast/ToastProvider';
46

57
function App() {
68
return (
7-
<ToastProvider>
8-
<RouterProvider router={router} />
9-
</ToastProvider>
9+
<QueryClientProvider client={queryClient}>
10+
<ToastProvider>
11+
<RouterProvider router={router} />
12+
</ToastProvider>
13+
</QueryClientProvider>
1014
);
1115
}
1216

src/api/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import type { ApiError, ApiResponse } from '@/types/api-response';
22
import axios from 'axios';
33

44
const BASE_URL = import.meta.env.VITE_API_URL;
5+
const BASE_PATH = '/api/v1';
56

67
const api = axios.create({
7-
baseURL: BASE_URL,
8+
baseURL: `${BASE_URL}${BASE_PATH}`,
89
timeout: 7000,
910
headers: {
1011
'Content-Type': 'application/json',

src/api/theater/theater.api.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import api from '@/api/api';
2+
import type { ApiResponse } from '@/types/api-response';
3+
import type { CinemaFormat } from '@/types/onboarding';
4+
import type { Theater } from '@/types/theater';
5+
6+
// 영화관 목록 조회
7+
export interface GetTheatersParams {
8+
type: CinemaFormat;
9+
page: number;
10+
size: number;
11+
}
12+
13+
const getTheaters = async ({
14+
type,
15+
page = 1,
16+
size = 10,
17+
}: GetTheatersParams): Promise<Theater[]> => {
18+
const res = await api.get<ApiResponse<{ content: Theater[] }>>('/theaters', {
19+
params: {
20+
auditoriumType: type,
21+
page,
22+
size,
23+
},
24+
});
25+
26+
const content = res.data.data?.content;
27+
28+
if (!content) {
29+
throw new Error('영화관 목록에 응답이 없습니다.');
30+
}
31+
32+
return content;
33+
};
34+
35+
// 좌석 배치도 조회
36+
37+
// 평점/개수 포함된 좌석 배치도 조회
38+
39+
// 상영관 상세 조회
40+
export { getTheaters };

src/api/user/users.api.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import api from '@/api/api';
2+
import type { ApiResponse } from '@/types/api-response';
3+
import type { GenreEnType } from '@/types/movieGenre';
4+
5+
// 회원가입
6+
export interface RegisterPayload {
7+
nickname: string;
8+
genres: GenreEnType[];
9+
auditoriumId: string[];
10+
}
11+
12+
export const postRegister = async (
13+
data: RegisterPayload,
14+
tempUserKey: string,
15+
): Promise<ApiResponse<null>> => {
16+
const response = await api.post<ApiResponse<null>>('/users', data, {
17+
headers: {
18+
'Temp-User-Key': tempUserKey,
19+
},
20+
});
21+
return response.data;
22+
};
23+
24+
// 로그아웃

src/assets/gif/running_alt.gif

4.4 MB
Loading

0 commit comments

Comments
 (0)