diff --git a/src/components/Posts/Posts.tsx b/src/components/Posts/Posts.tsx index 80ecc100..590ed202 100644 --- a/src/components/Posts/Posts.tsx +++ b/src/components/Posts/Posts.tsx @@ -15,7 +15,7 @@ export const Posts: FC = () => { error: postsError, } = useQuery({ queryKey: ['cms', 'post', 'visible'], - queryFn: () => axios.get('/api/cms/post/visible'), + queryFn: () => axios.get(`/api/cms/post/visible?sites=${seminarId}`), }) const posts = postsData?.data ?? [] @@ -27,11 +27,9 @@ export const Posts: FC = () => { return ( - {posts - .filter((p) => p.sites.includes(seminarId)) - .map((post) => ( - - ))} + {posts.map((post) => ( + + ))} ) }