Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 검색 기능을 구현한다. #144

Merged
merged 23 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb2db21
fix: 컴포넌트명 postfix 제거 (component)
baegyeong Feb 20, 2024
f84f0c5
chore: use-debounce 패키지 추가
baegyeong Feb 21, 2024
11eb03c
feat: input의 onChange 함수 정의 (handleSearch)
baegyeong Feb 21, 2024
81bf3d7
feat: input 타입을 search로 변경
baegyeong Feb 21, 2024
bb12e6d
fix: button 태그 제거
baegyeong Feb 22, 2024
cd3efda
feat: Search 컴포넌트 구현
baegyeong Mar 10, 2024
88426be
feat: search api 정의
baegyeong Mar 10, 2024
552a146
feat: useSearchQuery 훅 구현
baegyeong Mar 10, 2024
6d9ecdf
feat: 면접기록 및 지원현황에서 검색결과 불러오기
baegyeong Mar 10, 2024
c77c6e1
fix: 지원날짜 오타 수정
baegyeong Mar 10, 2024
b0a5612
feat: search 컴포넌트에 defaultValue 지정
baegyeong Mar 10, 2024
86cc062
feat: search api 디렉토리 위치 변경
baegyeong Mar 10, 2024
77585b9
feat: 검색 시 navbar에 별도의 endPage 지정
baegyeong Mar 10, 2024
f202b78
fix: nullish로 연산자 변경
baegyeong Mar 10, 2024
2cc3b10
feat: 검색 결과가 없을 때 처리
baegyeong Mar 10, 2024
5628389
fix: component postfix 제거
baegyeong Mar 10, 2024
789b19e
fix: Txt 컴포넌트로 변경
baegyeong Mar 10, 2024
55e4852
fix: 요청 api 매개변수 interface 지정
baegyeong Mar 11, 2024
d83a01a
fix: Keyword에서 term으로 변수명 통일
baegyeong Mar 11, 2024
376e547
fix: useTransition 및 디바운스 라이브러리 변경
baegyeong Mar 11, 2024
4580891
fix: board 컴포넌트의 key prop 변경
baegyeong Mar 12, 2024
446f9dc
feat: useCreateQueryString 훅 생성
baegyeong Mar 13, 2024
650cacb
fix: useSearchQuery에서 겹치는 로직 수정
baegyeong Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: search api 디렉토리 위치 변경
baegyeong committed Mar 10, 2024
commit 86cc06299a35b37c79d96d0ccad1e3a5fbf96040
24 changes: 0 additions & 24 deletions frontend/src/apis/interview/index.ts
Original file line number Diff line number Diff line change
@@ -143,27 +143,3 @@ export interface DeleteInterviewerReq {
export const deleteInterviewer = async ({ idpId }: DeleteInterviewerReq) => {
const { data } = await https.delete(`/interviewers/${idpId}`);
};

export interface SearchInterviewerRes {
id: string;
name: string;
field: string;
field1: string;
field2: string;
grade: string;
semester: string;
uploadDate: string;
}

export interface GetSearchKeywordRes {
answers: SearchInterviewerRes[];
pageInfo: PageInfo;
}

export const getSearchKeyword = async (page: number, searchKeyword: string) => {
const { data } = await https.get<GetSearchKeywordRes>(
`/page/${page}/search/${searchKeyword}/applicants`
);

return data;
};
31 changes: 31 additions & 0 deletions frontend/src/apis/search/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { https } from "@/src/functions/axios";
import { PageInfo } from "../applicant";

export interface SearchInterviewerRes {
id: string;
name: string;
field: string;
field1: string;
field2: string;
grade: string;
semester: string;
uploadDate: string;
}

export interface GetSearchKeywordRes {
answers: SearchInterviewerRes[];
pageInfo: PageInfo;
}

export const getSearchKeyword = async (page: number, searchKeyword: string) => {
const {
data: { answers, pageInfo },
} = await https.get<GetSearchKeywordRes>(
`/page/${page}/search/${searchKeyword}/applicants`
);

return {
answers,
endPage: pageInfo.endPage,
};
};