Skip to content

Commit

Permalink
🍁 Bug: All broadcast Should show approved broadcast only (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
BHS-Harish authored Jul 30, 2024
1 parent 366e80c commit 3becc77
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export function AllBroadcasts(props) {
getData(api);
}, [month, page, tags, year]);

const getData = async (api)=>{
const getData = async (api) => {
setLoaded(false);
const result = await customBoardcast(api);
setArray(result);
setArray(filterApprovedBroatcast(result));
setLoaded(true);
}
};

return (
<main
Expand Down Expand Up @@ -219,3 +219,9 @@ export function AllBroadcasts(props) {
</main>
);
}

const filterApprovedBroatcast = (broadcasts) => {
return broadcasts.filter((broadcast) => {
return broadcast.isApproved == true;
});
};

0 comments on commit 3becc77

Please sign in to comment.