Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

713 B
Raw Blame
'use client';

import { memo } from 'react';

import GenerationFeed from '@/routes/(main)/(create)/features/GenerationFeed';
import { useImageStore } from '@/store/image';
import { generationBatchSelectors } from '@/store/image/selectors';

import { GenerationBatchItem } from './BatchItem';

const ImageGenerationFeed = memo(() => {
  const currentGenerationBatches = useImageStore(generationBatchSelectors.currentGenerationBatches);

  return (
    <GenerationFeed
      batches={currentGenerationBatches ?? []}
      renderBatchItem={(batch) => <GenerationBatchItem batch={batch} key={batch.id} />}
    />
  );
});

ImageGenerationFeed.displayName = 'ImageGenerationFeed';

export default ImageGenerationFeed;