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

[INQUIRY] 문의하기 UI 수정 #109

Merged
merged 51 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a5c80d8
feat: /inquiry UI 변경
junghaesung79 Sep 28, 2023
784a422
feat: 전체 문의 api 구현
junghaesung79 Sep 28, 2023
755baf9
feat: DataTable 변경
junghaesung79 Sep 29, 2023
804d39e
feat: pagination 삭제, 무한 스크롤 구현
junghaesung79 Sep 30, 2023
f58380c
feat: 나의 문의 임시 연결
junghaesung79 Oct 2, 2023
fcc6f19
style: 선택된 문의 표시
junghaesung79 Oct 9, 2023
aa60f2b
refactor: DataTable 수정
junghaesung79 Oct 12, 2023
b192643
Merge branch 'develop' of https://github.com/BCSDLab/JJBAKSA_FRONT_EN…
junghaesung79 Oct 13, 2023
8d85337
style: 반응형 css 추가
junghaesung79 Oct 18, 2023
f13b094
Merge branch 'develop' into feature/#103
junghaesung79 Oct 18, 2023
9377384
refactor: lint 에러 수정
junghaesung79 Oct 18, 2023
097de5f
refactor: stylelint 에러 수정
junghaesung79 Oct 18, 2023
dbfce20
style: 반응형 css 수정
junghaesung79 Oct 18, 2023
413ee23
refactor: 클래스 이름 변경
junghaesung79 Oct 24, 2023
445bbc7
Merge branch 'develop' into feature/#103
junghaesung79 Oct 24, 2023
6b1fc77
refactor: 타이틀을 컴포넌트에 통합
junghaesung79 Oct 24, 2023
e87bf5f
refactor: 타이틀을 컴포넌트에 통합에 대한 추가 수정
junghaesung79 Oct 24, 2023
20b9a35
refactor: InquirySelectButton 컴포넌트 분리
junghaesung79 Oct 27, 2023
7728453
refactor: InquirySelectButton 컴포넌트 분리 추가 수정
junghaesung79 Oct 27, 2023
42f9d69
refactor: DataBlock 컴포넌트 분리
junghaesung79 Oct 27, 2023
32b9ba3
refactor: Inquire에서 Explain 분리
junghaesung79 Oct 27, 2023
7c81ce0
refactor: Inquire의 Explain 분리
junghaesung79 Oct 27, 2023
a79bf8c
refactor: 클래스명, 태그명 컨벤션에 맞게 수정
junghaesung79 Oct 27, 2023
4333712
refactor: 파일명 수정, 파일 위치 변경
junghaesung79 Nov 3, 2023
5c6cca8
refactor: 네이밍 BEM 등 컨벤션 준수
junghaesung79 Nov 3, 2023
b7c067c
refactor: 문의 데이터 expander 구현 위치 변경
junghaesung79 Nov 3, 2023
f1b7e2a
refactor: lint 예외 처리 위치 변경
junghaesung79 Nov 3, 2023
f1ced58
remove: 사용하지 않는 컴포넌트 삭제
junghaesung79 Nov 3, 2023
f432f27
refactor: DataBlock 수정
junghaesung79 Nov 3, 2023
1047ddd
refactor: lint 에러 수정
junghaesung79 Nov 3, 2023
d658159
refactor: Inquire 페이지 수정
junghaesung79 Nov 3, 2023
a29063e
refactor: 중복되는 interface 수정
junghaesung79 Nov 3, 2023
626678d
refactor: 함수 표현 변경
junghaesung79 Nov 3, 2023
44ad880
refactor: loadMoreData 수정
junghaesung79 Nov 4, 2023
a14cd2e
fix: loadMoreData 수정
junghaesung79 Nov 4, 2023
3defb19
refactor: media-breakpoint 사용
junghaesung79 Nov 4, 2023
121e250
Merge branch 'develop' into feature/#103
junghaesung79 Nov 9, 2023
b909352
refactor: lint 에러 수정
junghaesung79 Nov 9, 2023
ace04d8
refactor: css 상속으로 인한 생략
junghaesung79 Nov 10, 2023
fd5a643
refactor: SearchBar 수정
junghaesung79 Nov 20, 2023
dfef5de
refactor: 글 줄임 변경
junghaesung79 Nov 20, 2023
66652aa
refactor: 필요 없는 함수 제거
junghaesung79 Nov 23, 2023
2af2587
refactor: 컴포넌트 이름 변경
junghaesung79 Nov 24, 2023
d57128a
refactor: 필요 없는 구문 삭제
junghaesung79 Nov 24, 2023
d689c76
Merge branch 'develop'
junghaesung79 Nov 24, 2023
aa7428a
chore: yarn install
junghaesung79 Nov 25, 2023
2ec159a
refactor: query 버전 업
junghaesung79 Nov 26, 2023
fbae203
Merge remote-tracking branch 'origin/develop' into feature/#103
junghaesung79 Nov 28, 2023
790771d
Merge branch 'develop' into feature/#103
junghaesung79 Nov 28, 2023
4f665ee
refactor: develop 머지
junghaesung79 Nov 28, 2023
3513eec
refactor: lint 에러 수정
junghaesung79 Nov 28, 2023
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
9 changes: 5 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import Setting from 'pages/Setting';
import IdChange from 'pages/Setting/Mobile/IdChange';
import AuthRoute from 'components/common/AuthRoute';
import Withdrawal from 'pages/Setting/Withdrawal';
import Inquiry from 'pages/Inquiry';
import Myinquiry from 'pages/Inquiry/Myinquiry';
import Inquiry from 'pages/Inquiry/Inquiry';
import Inquire from 'pages/Inquiry/Inquire';
import Notice from 'pages/Notice';
import KakaoLogin from 'pages/Auth/OAuth/KakaoLogin';
import NaverLogin from 'pages/Auth/OAuth/NaverLogin';
Expand All @@ -35,8 +35,9 @@ export default function App(): JSX.Element {
<Route path="/search" element={<Search />} />
<Route path="/search/:keyword" element={<SearchDetails />} />
<Route path="/search/not-found" element={<NotFoundPage />} />
<Route path="/inquiry" element={<Inquiry />} />
<Route path="/myinquiry" element={<Myinquiry />} />
<Route path="/inquiry/:type" element={<Inquiry />} />
<Route path="/inquiry/search/:keyword" element={<Inquiry />} />
<Route path="/inquiry/inquire" element={<Inquire />} />
<Route path="/notice" element={<Notice />} />
</Route>
<Route element={<AuthRoute needAuth redirectRoute="/login" />}>
Expand Down
52 changes: 52 additions & 0 deletions src/api/inquiry/entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
export interface GetInquiryResponse {
content: InquiryContent[];
empty: boolean;
first: boolean;
last: boolean;
number: number;
numberOfElements: number;
pageable: InquiryPageable;
size: number;
sort: InquirySort;
totalElements: number;
totalPages: number;
}

export interface InquiryContent {
answer: string;
content: string;
createdAt: string;
createdBy: string;
id: number;
inquiryImages: InquiryImage[];
isSecreted: number;
title: string;
}

export interface InquiryImage {
imageUrl: string;
originalName: string;
path: string;
}

export interface InquiryPageable {
offset: number;
pageNumber: number;
pageSize: number;
paged: boolean;
sort: InquirySort;
unpaged: boolean;
}

export interface InquirySort {
empty: boolean;
sorted: boolean;
unsorted: boolean;
}

export interface InquiryProps {
typePath: string;
dateCursor: string | null;
idCursor: number | null;
size: number;
}
16 changes: 16 additions & 0 deletions src/api/inquiry/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { GetInquiryResponse, InquiryProps } from './entity';
import inquiryApi from './inquiryApiClient';

const getInquiry = async ({
typePath, dateCursor, idCursor, size,
}: InquiryProps) => {
try {
const queryParams = `${typePath}?dateCursor=${dateCursor}&idCursor=${idCursor}&size=${size}`;
const { data } = await inquiryApi.get<GetInquiryResponse>(`/inquiry${queryParams}`);
return data;
} catch (error) {
return null;
}
};

export default getInquiry;
9 changes: 9 additions & 0 deletions src/api/inquiry/inquiryApiClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import axios from 'axios';
import { API_PATH } from 'config/constants';

const inquiryApi = axios.create({
baseURL: `${API_PATH}`,
timeout: 2000,
});
junghaesung79 marked this conversation as resolved.
Show resolved Hide resolved

export default inquiryApi;
3 changes: 3 additions & 0 deletions src/assets/svg/inquiry/dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions src/assets/svg/inquiry/write-inquiry.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/svg/inquiry/write.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 0 additions & 23 deletions src/components/MyInquiry/MyInquiry.module.scss

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/MyInquiry/index.tsx

This file was deleted.

33 changes: 33 additions & 0 deletions src/pages/Inquiry/Inquire/Inquire.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$default: #222222;
$highlight: #ff7f23;
$back: white;
$normal: #666666;
$disabled: #c4c4c4;

.container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: row;
}

.box {
width: 947px;
}

.menu {
width: 227px;
height: 100%;

&__link {
display: block;
margin: 160px 0 32px;
background-color: transparent;
font-size: 32px;
font-weight: 700;
text-decoration: none;
color: $highlight;
cursor: pointer;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$default: #222222;
$highlight: #ff7f23;
$back: white;
$normal: #666666;
$disabled: #c4c4c4;

.explain {
cursor: default;

&__title {
color: $default;
font-size: 16px;
font-weight: 500;
line-height: 19.97px;
}

&__small-title {
color: $normal;
font-size: 11px;
font-weight: 400;
line-height: 13.73px;
}
}
21 changes: 21 additions & 0 deletions src/pages/Inquiry/Inquire/components/Explain/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { ReactComponent as WriteInquiryIcon } from 'assets/svg/inquiry/write-inquiry.svg';
import styles from './Explain.module.scss';

export default function Explain({ className }: { className: string }): JSX.Element {
return (
<div className={className}>
<div className={styles.explain}>
<div className={styles.explain__svg}>
<WriteInquiryIcon />
</div>
<div className={styles.explain__title}>
쩝쩝박사 이용 중에 생긴 불편한 점이나 문의사항을 등록해주세요.
</div>
<div className={styles['explain__small-title']}>
확인 후 순차적으로 답변 드리겠습니다.
</div>
</div>
</div>
);
}
25 changes: 25 additions & 0 deletions src/pages/Inquiry/Inquire/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Link } from 'react-router-dom';
import Explain from './components/Explain';
import styles from './Inquire.module.scss';

export default function Inquiry(): JSX.Element {
return (
<div className={styles.container}>
<div className={styles.box}>
<div className={styles.menu}>
<Link to="/inquiry/all" className={styles.menu__link}>
<div className={styles['menu__title-text']}>
문의하기
</div>
</Link>

<Explain className={styles.menu__explain} />
</div>

<div className={styles.form}>
a
</div>
</div>
</div>
);
}
71 changes: 0 additions & 71 deletions src/pages/Inquiry/Inquiry.module.scss

This file was deleted.

Loading