const { __ } = wp.i18n;

const AssignedTo = ( { th } ) => {

    const assignee = th.assignedTo;
    if (!assignee) {
        return null;
    }

    return (
        <div class="user-assigned-to">
            <span class="icon"></span>
            <span class="assign-avatar-data">
            {__(
                "Assigned to",
                "commenting-feature"
            )}
            <a
                href={`mailto:${assignee.email ?? ""}`}
                title={
                assignee.username
                }
            >
                {" "}
                {assignee.username}
            </a>
            </span>
        </div>
    )

};

export default AssignedTo;