/**
 * Memoized Review Card Component
 * Optimized for list rendering performance
 */

import React from 'react';

interface Review {
  id: string;
  rating: number;
  comment: string | null;
  created_at: string;
  updated_at: string;
  user_id: string;
}

interface ReviewCardProps {
  review: Review;
  onEdit?: (review: Review) => void;
  onDelete?: (reviewId: string) => void;
}

export const ReviewCard: React.FC<ReviewCardProps> = ({ review, onEdit, onDelete }) => {
  // Component implementation would go here
  // This is a placeholder for the actual review card
  return null;
};

export const ReviewCardMemo = React.memo(ReviewCard, (prevProps, nextProps) => {
  return (
    prevProps.review.id === nextProps.review.id &&
    prevProps.review.rating === nextProps.review.rating &&
    prevProps.review.comment === nextProps.review.comment &&
    prevProps.review.updated_at === nextProps.review.updated_at
  );
});

ReviewCardMemo.displayName = 'ReviewCardMemo';
