<main role="main" class="container mt-3">
      <h1>Their Pocket</h1>

      <div class="info-section">
        <h2>ユーザー情報</h2>
        <p><strong>名前:</strong> <%= user.name %></p>
        <p><strong>自己紹介:</strong> <%= user.description %></p>
        <p><strong>所有コイン:</strong> <%= user.coins %> コイン</p>
        <p><strong>獲得いいね:</strong> <%= totalLikes %> いいね</p>
        <% if (isFollowing) { %>
          <form action="/account/unfollow/<%= user.id %>" method="POST">
            <button type="submit" class="btn btn-danger">フォロー解除</button>
          </form>
        <% } else { %>
          <form action="/account/follow/<%= user.id %>" method="POST">
            <button type="submit" class="btn btn-success">フォロー</button>
          </form>
        <% } %>
      </div>

      <div class="posts-section">
        <h2>投稿</h2>
        <% if (posts.length > 0) { %>
          <ul>
            <% posts.forEach(function(post) { %>
              <li>
                <a href="/bridges/<%= post.shop_id %>">
                  <strong>橋梁名:</strong> <%= post.bridge_name %><br>
                  <strong>損傷程度:</strong> <%= post.score %><br>
                  <strong>投稿内容:</strong> <%= post.description %> <br>
                  <strong>投稿日時:</strong> <%= moment(post.post).format('YYYY-MM-DD HH:mm') %>
                </a>
              </li>
            <% }) %>
          </ul>
        <% } else { %>
          <p>まだ投稿がありません。</p>
        <% } %>
      </div>
    </main>