const sorting = (n1, n2) => [...n1.split(','), ...n2.split(',')].sort();
const inverting = (n1, n2) => [...n1.split(','), ...n2.split(',')].reverse();
switch (requiredOperation) {
case '!':
console.log(sorting(num1, num2));
break;
case '?':
console.log(inverting(num1, num2));
break;
default:
console.log('undefined operation');
}
$(function(){
$('.sh_nmr').textToggle(".sh_nmr","").click();
$('.sh_nmr').textToggle(".num_hide","ХХХ").click();
$('.click_number_header').on("click" , () => ga('send', 'event', 'click_number_header321', 'click', 'Click number header'));
});
import React from 'react';
import styles from './Messages.module.css';
function Messages(props) {
const messages = props.messages.map((item, i) => {
return (
<li className={styles.item} key={ i }>
<div className={styles.date}>date: { item.date.toString() }</div>
<div className={styles.name}>name: { item.name }</div>
<div className={styles.gender}>gender: { item.gender }</div>
<div className={styles.subject}>subject: { item.subject }</div>
<div className={styles.text}>text: { item.text }</div>
</li>
)
});
return (
<ul className={styles.messages}>
{ messages }
</ul>
);
}
const mapStateToProps = state => {
return {
messages: state.messagesReducer.messages,
}
}
export default connect(mapStateToProps, {})(Messages);