<commit_before>import React from 'react';
import { Header, 
        Segment,
        Card, 
        Icon, 
        Reveal } from 'semantic-ui-react';

let alertColor = (alert) => {
    let alertColors = {
		'good': 'green',
		'information': 'orange',
		'warning': 'red'
    }
	
	return alertColors[alert] || '';
}

const AlertIcon = ({alert}) => {
	let icons = {
	  'good': 'thumbs up',
      'information': 'info circle',
	  'warning': 'warning sign'
	}

	return <Icon name={icons[alert] || ''} size='huge' color={alertColor(alert)} />
 }
 
 
const AlertDescription = ({alert, benefit}) => {
	let alertMessages = {
		'good':  `<strong>All Good!</strong> Based on your inputs, your <strong>${benefit}</strong> benefits are safe.`,
        'information': `<strong>FYI!</strong> You are in danger of losing your <strong>${benefit}</strong> benefits.`,
	    'warning': `<strong>Warning!</strong> Based on your inputs, you will lose <strong>${benefit}</strong> benefits!`
	}
	
	return (
		<Reveal.Content visible as={Card.Description} style={{ backgroundColor: '#ffffff' }} >
            <span dangerouslySetInnerHTML={{__html: alertMessages[alert] || ''}} /><commit_msg>Get rid of dangerously set inner HTML<commit_after>import React from 'react';
import { Header, 
        Segment,
        Card, 
        Icon, 
        Reveal } from 'semantic-ui-react';

let alertColor = (alert) => {
    let alertColors = {
		'good': 'green',
		'information': 'orange',
		'warning': 'red'
    }
	
	return alertColors[alert] || '';
}

const AlertIcon = ({alert}) => {
	let icons = {
	  'good': 'thumbs up',
      'information': 'info circle',
	  'warning': 'warning sign'
	}

	return <Icon name={icons[alert] || ''} size='huge' color={alertColor(alert)} />
 }
 
const AlertDescription = ({alert, benefit}) => {
	let alertMessages = {
		'good':  (<span><strong>All Good!</strong> Based on your inputs, your <strong>{benefit}</strong> benefits are safe.</span>),
        'information': (<span><strong>FYI!</strong> You are in danger of losing your <strong>{benefit}</strong> benefits.</span>),
	    'warning': (<span><strong>Warning!</strong> Based on your inputs, you will lose <strong>{benefit}</strong> benefits!</span>)
	}

	return (
		<Reveal.Content visible as={Card.Description} style={{ backgroundColor: '#ffffff' }} >
			{alertMessages[alert]}
{'fraction_non_alphanumeric': 0.17873981997428204, 'fraction_numerical': 0.0, 'mean_word_length': 3.7439024390243905, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4771175', 'n_tokens_mistral': 776, 'n_tokens_neox': 721, 'n_words': 192}