Skip to content

Commit aa8bee3

Browse files
authored
Merge pull request #1164 from woowacourse-teams/FE/test
[FE] 🔖 운영 서버 배포
2 parents 4f3271c + 27da76b commit aa8bee3

File tree

93 files changed

+1284
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1284
-821
lines changed

.github/workflows/fe_review_request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
env:
12+
DISCORD_WEBHOOK_URL: ${{ secrets.FE_SLACK_WEB_HOOK }}
1113
steps:
1214
- name: Extract receiver list
1315
id: extract_receiver_list
@@ -29,5 +31,5 @@ jobs:
2931
- name: Discord Message
3032
uses: discord-actions/message@v2
3133
with:
32-
webhookUrl: https://discord.com/api/webhooks/1326507349841809520/WD7X1LxAckgK1z2_2qQ1qvSGx3719XwkXocV_oNz8pmVMgJvDO2znJAWmVhSToM_wjBo
34+
webhookUrl: ${{ env.DISCORD_WEBHOOK_URL }}
3335
message: "👑${{steps.extract_receiver_list.outputs.requester}}👑 PR이 도착했습니다. \n↓↓↓\n\n⚡⚡⚡⚡⚡⚡⚡⚡⚡\n*⚡[${{steps.extract_receiver_list.outputs.requester}}](${{github.event.pull_request.html_url}}) 혼구멍 내러가기~>⚡* \n⚡⚡⚡⚡⚡⚡⚡⚡⚡\n\n _혼내줄 사람들: ${{steps.extract_receiver_list.outputs.names}}_ \n"

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@octokit/rest": "^21.0.1",
2020
"@sentry/react": "^8.22.0",
2121
"@sentry/webpack-plugin": "^2.21.1",
22+
"@stomp/stompjs": "^7.0.0",
2223
"@tanstack/react-query": "^5.51.11",
2324
"dotenv-webpack": "^8.1.0",
2425
"react": "^18.3.1",
@@ -27,6 +28,7 @@
2728
"react-icons": "^5.3.0",
2829
"react-router-dom": "^6.25.1",
2930
"styled-components": "^6.1.12",
31+
"ws": "^8.18.0",
3032
"zustand": "^4.5.4"
3133
},
3234
"devDependencies": {

frontend/src/App.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,19 @@ import HowToPair from '@/components/Landing/HowToPair/HowToPair';
2525

2626
import useUserStore from '@/stores/userStore';
2727

28-
import { getMember } from '@/apis/member';
29-
import { getIsUserLoggedIn } from '@/apis/oauth';
28+
import { getMember } from '@/apis/http/member';
29+
import { getIsUserLoggedIn } from '@/apis/http/oauth';
3030

3131
import GlobalStyles from './styles/Global.style';
3232
import { theme } from './styles/theme';
3333

34-
const queryClient = new QueryClient();
34+
const queryClient = new QueryClient({
35+
defaultOptions: {
36+
queries: {
37+
refetchOnWindowFocus: false,
38+
},
39+
},
40+
});
3541

3642
const App = () => {
3743
const { setUser } = useUserStore();

frontend/src/apis/category.ts

Lines changed: 0 additions & 57 deletions
This file was deleted.

frontend/src/apis/http/category.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fetcher from '@/apis/http/fetcher';
2+
3+
import { ERROR_MESSAGES } from '@/constants/message';
4+
5+
const API_URL = process.env.REACT_APP_API_URL;
6+
7+
interface GetCategoriesResponse {
8+
value: string;
9+
id: string;
10+
}
11+
12+
export const getCategories = async (accessCode: string): Promise<GetCategoriesResponse[]> => {
13+
const response = await fetcher.get({
14+
url: `${API_URL}/${accessCode}/category`,
15+
errorMessage: ERROR_MESSAGES.GET_CATEGORIES,
16+
});
17+
18+
return await response.json();
19+
};
File renamed without changes.
File renamed without changes.

frontend/src/apis/member.ts renamed to frontend/src/apis/http/member.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fetcher from '@/apis/fetcher';
2-
import type { PairRoomStatus } from '@/apis/pairRoom';
1+
import fetcher from '@/apis/http/fetcher';
2+
import type { PairRoomStatus } from '@/apis/http/pairRoom';
33

44
import { ERROR_MESSAGES } from '@/constants/message';
55

frontend/src/apis/oauth.ts renamed to frontend/src/apis/http/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fetcher from '@/apis/fetcher';
1+
import fetcher from '@/apis/http/fetcher';
22

33
import { ERROR_MESSAGES } from '@/constants/message';
44

frontend/src/apis/pairRoom.ts renamed to frontend/src/apis/http/pairRoom.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Category } from '@/components/PairRoom/ReferenceCard/ReferenceCard.type';
22

3-
import fetcher from '@/apis/fetcher';
4-
import { Reference } from '@/apis/referenceLink';
5-
import { Todo } from '@/apis/todo';
3+
import fetcher from '@/apis/http/fetcher';
4+
import { Reference } from '@/apis/http/referenceLink';
5+
import { Todo } from '@/apis/http/todo';
66

77
import { ERROR_MESSAGES } from '@/constants/message';
88

@@ -87,21 +87,16 @@ export const updatePairRole = async ({ accessCode }: UpdatePairRoleRequest) => {
8787
});
8888
};
8989

90-
interface UpdatePairRoomStatusRequest {
91-
accessCode: string;
92-
}
93-
94-
export const updatePairRoomStatus = async ({ accessCode }: UpdatePairRoomStatusRequest) => {
90+
export const completePairRoom = async ({ accessCode }: { accessCode: string }) => {
9591
await fetcher.patch({
96-
url: `${API_URL}/pair-room/${accessCode}/status`,
92+
url: `${API_URL}/pair-room/${accessCode}/complete`,
9793
errorMessage: ERROR_MESSAGES.UPDATE_PAIR_ROOM_STATUS,
98-
body: JSON.stringify({ status: 'COMPLETED' }),
9994
});
10095
};
10196

10297
export const deletePairRoom = async ({ accessCode }: { accessCode: string }) => {
103-
await fetcher.delete({
104-
url: `${API_URL}/pair-room/${accessCode}`,
98+
await fetcher.patch({
99+
url: `${API_URL}/pair-room/${accessCode}/delete`,
105100
errorMessage: ERROR_MESSAGES.DELETE_PAIR_ROOM,
106101
});
107102
};

0 commit comments

Comments
 (0)