import React from 'react';

interface FormattedListingTextProps {
  text: string;
}

const FormattedListingText: React.FC<FormattedListingTextProps> = ({ text }) => {
  const parts = text.split(/\*\*(.*?)\*\*/g);
  
  return (
    <div style={{ whiteSpace: 'pre-line' }}>
      {parts.map((part, index) => 
        index % 2 === 1 ? 
        <strong key={index}>{part}</strong> : 
        part
      )}
    </div>
  );
};

export default FormattedListingText;