improve load question
This commit is contained in:
parent
969c184046
commit
4b536558fc
1 changed files with 6 additions and 2 deletions
|
|
@ -24,7 +24,9 @@ export function AnswersList() {
|
|||
.then(({ answers }) => sortByPoints(answers).map(answer => ({ ...answer, question_id })))
|
||||
.catch(() => []);
|
||||
|
||||
return <PaginatedList {...{ count, Component: Answer, getData, noData: false }} />;
|
||||
return (
|
||||
question_id && <PaginatedList {...{ count, Component: Answer, getData, noData: false }} />
|
||||
);
|
||||
}
|
||||
|
||||
export function CommentsList() {
|
||||
|
|
@ -35,5 +37,7 @@ export function CommentsList() {
|
|||
.then(({ comments }) => comments.map(comment => ({ ...comment, question_id })))
|
||||
.catch(() => []);
|
||||
|
||||
return <PaginatedList {...{ count, Component: Comment, getData, noData: false }} />;
|
||||
return (
|
||||
question_id && <PaginatedList {...{ count, Component: Comment, getData, noData: false }} />
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue