import React from 'react'; import { usePosts } from '../hooks/usePosts'; import PostCard from '../components/PostCard'; import './News.css'; const News = () => { // Pass the category slug 'news' to filter posts const { posts, loading, error } = usePosts(1, 9, 'news'); if (loading) { return (
); } if (error) { return (

Oops! Something went wrong.

Failed to load news. Please try again later.

Error: {error.message}

); } return (

소식 (News)

Sokuree Consultant의 최신 소식과 인사이트를 전해드립니다.

{posts.map((post) => ( ))}
{posts.length === 0 && (

등록된 소식이 없습니다.

)}
); }; export default News;