Skip to content

Commit

Permalink
fix filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 committed Nov 15, 2024
1 parent 0672214 commit bde6572
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions instances/treasury-templar.near/widget/components/rfps/Feed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const FeedPage = () => {
State.update({ loading: true });

searchCacheApi().then((result) => {
let body = result.body;
let body = result.body.records;
const data = [];
const acceptingData = [];
for (const prop of body) {
Expand Down Expand Up @@ -282,11 +282,7 @@ const FeedPage = () => {
fetchUrl += `&filters.stage=${variables.stage}`;
}
if (variables.category) {
if (isInfra || isEvents) {
fetchUrl += `&filters.labels=${variables.category}`;
} else {
fetchUrl += `&filters.category=${variables.category}`;
}
fetchUrl += `&filters.labels=${variables.category}`;
}

State.update({ isFiltered: variables.category || variables.stage });
Expand Down Expand Up @@ -318,7 +314,7 @@ const FeedPage = () => {
order: state.sort,
limit: FETCH_LIMIT,
offset,
category: state.category ? encodeURIComponent(state.category) : "",
category: state.label ? encodeURIComponent(state.label) : "",
stage: state.stage ? encodeURIComponent(state.stage) : "",
};

Expand Down Expand Up @@ -529,6 +525,8 @@ const FeedPage = () => {
</div>
)}
</div>
) : state.loading ? (
loader
) : state.aggregatedCount > 0 ? (
<InfiniteScroll
pageStart={0}
Expand Down

0 comments on commit bde6572

Please sign in to comment.