import { useEffect } from "react"; import { calender } from "../utils"; import Link from "next/link"; import { BlogData } from "@/utils/constant.utils"; const BlogSidebar = ({ currentSlug }) => { useEffect(() => { calender(); }, []); const relatedBlogs = BlogData?.filter((b) => b.slug !== currentSlug) || []; const randomRelated = relatedBlogs.length > 0 ? relatedBlogs[Math.floor(Math.random() * relatedBlogs.length)] : null; return (