--- import type { Post } from '@/types'; import { getCollection } from 'astro:content'; import { shouldShowPost } from '@/utils/markdown'; import { siteConfig } from '@/config'; import Icon from './Icon.astro'; export interface Props { currentSlug?: string; } export interface LocalGraphData { shouldRender: boolean; } const { currentSlug } = Astro.props; // Get all posts for graph data const allPosts = await getCollection('posts'); const isDev = import.meta.env.DEV; const visiblePosts = allPosts.filter(p => shouldShowPost(p, isDev)); // Check if we should show the graph based on connections // This component should only be rendered when there are connections (checked in PostLayout) // But we'll add an additional client-side check as a safety measure const shouldShowGraph = true; --- {shouldShowGraph && (