diff --git a/frontend/src/pages/Broadcast/Component/AllBroadcasts/AllBroadcasts.jsx b/frontend/src/pages/Broadcast/Component/AllBroadcasts/AllBroadcasts.jsx index 1f94b9bb..2895b81a 100644 --- a/frontend/src/pages/Broadcast/Component/AllBroadcasts/AllBroadcasts.jsx +++ b/frontend/src/pages/Broadcast/Component/AllBroadcasts/AllBroadcasts.jsx @@ -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 (
); } + +const filterApprovedBroatcast = (broadcasts) => { + return broadcasts.filter((broadcast) => { + return broadcast.isApproved == true; + }); +};