import React, { Component } from 'react'; import Avatar from '@material-ui/core/Avatar'; import './index.scss'; import { toast } from 'react-toastify'; export default class Message2D extends Component { state = { value: this.props.message.value }; click(id) { if (this.props.isActive) { this.setState({ value: id }); toast.success('ثبت شد'); this.props.action(); } } render() { const { message, user, isSelf, isActive, action } = this.props; return (