import React from 'react'; import { CurrentView, BusinessStory } from '../types'; import { SECTION_IDS, BUSINESS_SECTION_CONTENT } from '../constants'; import { ChevronRightIcon } from './icons'; import BusinessCard from './BusinessCard'; interface BusinessSectionProps { businessStories: BusinessStory[]; // Added to accept fetched data setCurrentView: (view: CurrentView) => void; setSelectedItemId: (id: string | null) => void; } const BusinessSection: React.FC = ({ businessStories, setCurrentView, setSelectedItemId }) => { const handleShowAllClick = (e: React.MouseEvent) => { e.preventDefault(); setCurrentView('businessLanding'); setSelectedItemId(null); }; if (!businessStories || businessStories.length === 0) { return (
{/* Optionally, you can add a loading or empty state specific to this section */}
); } return (

{BUSINESS_SECTION_CONTENT.title}

{BUSINESS_SECTION_CONTENT.showAllText}
{businessStories.slice(-6).reverse().map(story => ( // Show up to 6 stories in the scroller ))}
); }; export default BusinessSection;