Skip to content

Commit 9c881bf

Browse files
authored
Merge pull request #154 from team-ppointer/feat/native/qna-#151
[Feat/native/#151] QnA 페이지 구현
2 parents 9f55a05 + cfef850 commit 9c881bf

File tree

161 files changed

+10760
-2095
lines changed

Some content is hidden

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

161 files changed

+10760
-2095
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { $api } from '@apis';
2+
3+
const deleteQnaChat = () => {
4+
return $api.useMutation('delete', '/api/admin/qna/chat/{chatId}');
5+
};
6+
7+
export default deleteQnaChat;
8+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { $api } from '@apis';
2+
3+
interface GetQnaParams {
4+
query?: string;
5+
}
6+
7+
const getQna = (params?: GetQnaParams) => {
8+
return $api.useQuery('get', '/api/admin/qna', {
9+
params: {
10+
query: params,
11+
},
12+
});
13+
};
14+
15+
export default getQna;
16+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { $api } from '@apis';
2+
3+
interface GetQnaByIdParams {
4+
qnaId: number;
5+
enabled?: boolean;
6+
}
7+
8+
const getQnaById = ({ qnaId, enabled = true }: GetQnaByIdParams) => {
9+
return $api.useQuery(
10+
'get',
11+
'/api/admin/qna/{qnaId}',
12+
{
13+
params: {
14+
path: { qnaId },
15+
},
16+
},
17+
{ enabled }
18+
);
19+
};
20+
21+
export default getQnaById;
22+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import deleteQnaChat from './deleteQnaChat';
2+
import getQna from './getQna';
3+
import getQnaById from './getQnaById';
4+
import postQnaChat from './postQnaChat';
5+
import putQnaChat from './putQnaChat';
6+
import useSubscribeQna from './useSubscribeQna';
7+
8+
export { deleteQnaChat, getQna, getQnaById, postQnaChat, putQnaChat, useSubscribeQna };
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { $api } from '@apis';
2+
3+
const postQnaChat = () => {
4+
return $api.useMutation('post', '/api/admin/qna/chat');
5+
};
6+
7+
export default postQnaChat;
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { $api } from '@apis';
2+
3+
const putQnaChat = () => {
4+
return $api.useMutation('put', '/api/admin/qna/chat/{chatId}');
5+
};
6+
7+
export default putQnaChat;
8+

0 commit comments

Comments
 (0)