mirror of https://gitee.com/answerdev/answer.git
Merge branch 'fix-27' into 'main'
fix: #27 Fixed tag question list parameter See merge request opensource/answer!115
This commit is contained in:
commit
0f70354f50
|
@ -218,7 +218,7 @@ export type QuestionOrderBy =
|
|||
|
||||
export interface QueryQuestionsReq extends Paging {
|
||||
order: QuestionOrderBy;
|
||||
tags?: string[];
|
||||
tag?: string;
|
||||
}
|
||||
|
||||
export type AdminQuestionStatus = 'available' | 'closed' | 'deleted';
|
||||
|
|
|
@ -92,11 +92,11 @@ const QuestionList: FC<Props> = ({ source }) => {
|
|||
page_size: pageSize,
|
||||
page: curPage,
|
||||
order: curOrder as Type.QuestionOrderBy,
|
||||
tags: [tagName],
|
||||
tag: tagName,
|
||||
};
|
||||
|
||||
if (source === 'questions') {
|
||||
delete reqParams.tags;
|
||||
delete reqParams.tag;
|
||||
}
|
||||
const { data: listData, isLoading } = useQuestionList(reqParams);
|
||||
const count = listData?.count || 0;
|
||||
|
|
Loading…
Reference in New Issue