<h2><%= @user.email %></h2>
<p><%= link_to 'Add friend', add_friend_user_path(@user) if (current_user.id != @user.id) && !(current_user.users.include?(@user)) %></p>
<% if current_user.id == @user.id %>
    <h3>Your potential friends:</h3>
    <% @potential_friends.each do |friend| %>
        <%= friend.email %>
    <% end %>
    <h3>Your friends:</h3>
    <% @friends.each do |friend| %>
        <p><%= friend.email %></p><hr/>
    <% end %>
<% end %>

<h2><%= @user.email %></h2>

<% if current_user.id == @user.id %>
  <div class="col-md-4">
  <h3>Your potential friends:</h3>
  <% @potential_friends.each do |friend| %>
    <%= link_to friend.email, user_path(friend) %>
  <% end %>
  <h3>Your friends:</h3>
  <% @friends.each do |friend| %>
    <p><%= link_to friend.email, user_path(friend) %></p><hr/>
  <% end %>
  </div>
  <div class="col-md-4">
    <h3>Your chats:</h3>
    <% @user.chats.each do |chat| %>
      <p><%= link_to chat.title, chat_path(chat) %></p>
    <% end %>
  </div>
<% elsif !(current_user.users.include?(@user)) %>
  <p><%= link_to 'Add friend', add_friend_user_path(@user) %></p>
<% end %>
Add display chats for user
Add display chats for user
