-if @user.id != @current_user.id && !@current_user.friends.pluck(:id).include?(@user.id)
  = link_to 'Add as friend', user_friends_path(@user), method: :post
.games-container-index
  - if @user.id == @current_user.id
    %h1 Hi #{@current_user.first_name}!
  - else
    %h1 #{@user.first_name}'s Profile!
- if @user.id == current_user.id
  %h1.games-container-index Your Game Collection
- else
  %h1.games-container-index= "#{@user.full_name}'s Game Collection"
.games-container-index
  - if @games
    -@games.each do |game|
      %p#notice= notice
      .game-container-index
        .game-stats
          .title= link_to game.title, game
          .sub-game-stats
%br/
.games-container-index
  = link_to 'New Game', new_game_path

.friends-container
  %h1 Friends
  - if @user.id == @current_user.id
    .your-friends
      -@your_friends.each do |friend|
        =link_to friend.first_name, user_path(friend)
  - elsif @user.id != @current_user.id
    .their-friends
      -@their_friends.each do |friend|
        =link_to friend.first_name, user_path(friend)






.games-container-index
  - if @user.id == @current_user.id
    %h1 Hi #{@current_user.first_name}!
  - else
    %h1 #{@user.first_name}'s Profile!
- if @user.id == current_user.id
  %h1.games-container-index Your Game Collection
- else
  %h1.games-container-index= "#{@user.full_name}'s Game Collection"
.games-container-index
  - if @games
    -@games.each do |game|
      %p#notice= notice
      .game-container-index
        .game-stats
          .title= link_to game.title, game
          .sub-game-stats
%br/
.games-container-index
  = link_to 'New Game', new_game_path

.friends-container
  %h1 Friends
  -if @user.id != @current_user.id && !@current_user.friends.pluck(:id).include?(@user.id)
    = link_to 'Add as friend', user_friends_path(@user), method: :post
  - if @user.id == @current_user.id
    .your-friends
      -@your_friends.each do |friend|
        =link_to friend.first_name, user_path(friend)
  - elsif @user.id != @current_user.id
    .their-friends
      -@their_friends.each do |friend|
        =link_to friend.first_name, user_path(friend)






Change location of add friend
Change location of add friend
