Skip to content

Commit 024f329

Browse files
authored
Merge pull request #436 from cofacts/landing-with-replies
[LandingPage] include messages that has been replied
2 parents 3ae6359 + 6feae73 commit 024f329

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

components/LandingPage/SectionArticles.js

+6-15
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import leftImage from './images/article-left.png';
1111
import rightImage from './images/article-right.png';
1212

1313
const LIST_ARTICLES = gql`
14-
query GetArticlesList(
15-
$filter: ListArticleFilter
16-
$orderBy: [ListArticleOrderBy]
17-
$after: String
18-
) {
19-
ListArticles(filter: $filter, orderBy: $orderBy, after: $after, first: 10) {
14+
query GetArticlesInLandingPage {
15+
ListArticles(
16+
filter: { replyRequestCount: { GTE: 3 } }
17+
orderBy: [{ createdAt: DESC }]
18+
first: 10
19+
) {
2020
edges {
2121
node {
2222
id
@@ -131,20 +131,11 @@ const SectionArticles = () => {
131131
const classes = useStyles();
132132
const router = useRouter();
133133

134-
const listQueryVars = {
135-
filter: {
136-
replyRequestCount: { GTE: 2 },
137-
hasArticleReplyWithMorePositiveFeedback: false,
138-
},
139-
orderBy: [{ lastRequestedAt: 'DESC' }],
140-
};
141-
142134
const {
143135
loading,
144136
data: listArticlesData,
145137
error: listArticlesError,
146138
} = useQuery(LIST_ARTICLES, {
147-
variables: listQueryVars,
148139
ssr: false, // Fetch on browser is OK
149140
});
150141

0 commit comments

Comments
 (0)