"use client";
import React from "react";
import data from "@/util/blog.json";
import BlogAsideContent from "./BlogAsideContent";

export default function BlogAsideLatest() {
    const getAllBlogFunction = data.slice(0, 3);

    return (
        <div className="sidebar__widget">
            <h4 className="sidebar__widget-title">Latest Articles</h4>
            <div className="sidebar__post-list">
                {getAllBlogFunction.map((item) => (
                    <React.Fragment key={item.id}>{<BlogAsideContent item={item} />}</React.Fragment>
                ))}
            </div>
        </div>
    );
}
