<script>
  window.location = '/app/courses'
</script>
{% comment %} 
{% include "header" %}
{% include "course_version_outdated_alert", courses: courses.enrolled %}
<main class="np-main np-dashboard np-subpage-container np-max-width">
  <div class="row np-flex-center">
    <div class='title' style='font-size: 18px; font-weight: 500; text-align: center;'>
      Hey {{current_person.first_name}}, welcome to the Dasher learning center. Educate yourself on the best practices used by the highest-rated Dashers.
    </div>
    <div class="col-xs-12 col-sm-8">
      <div class="np-dashboard-resources-title">
        LEARNING CENTER
      </div>
      <div class="np-learning-paths-resources">

            {% for course in courses.enrolled %}
              {% for cat in course.categories %}
                {% if cat.name == "Dasher101" %}
                {% include 'cards_course_lp' with course %}
              {% endif %}
            {% endfor %}
        {% endfor %}
      </div>
    </div>

    {% if courses.enrolled.any? %}
    <div class="row row-with-thumbnails">
      {% for course in courses.enrolled %}
        {% for cat in course.categories %}
                {% if cat.name != "Dasher101" %}
          <div class="col-xs-12 col-sm-6 np-stretch-content">
            {% include "cards_course" with course %}
          </div>
          {% endif%}
        {% endfor %}
      {% endfor %}
    </div>
  {% else %}
    {% capture message %}
      {% t shared.zero_state.courses.index,
        key: current_school.course_vocabulary
      %}
    {% endcapture %}
    {% include "courses_zero_state", message: message %}
  {% endif %}

  {% if features.training_events? %}
  <div class="np-grid-spacing col-xs-12 col-sm-4">
    <div class="np-dashboard-resources-title">
      {% t .upcoming_events %}
    </div>
      {% include "training_events_dashboard" %}
  </div>
{% endif %}
  </div>
</main>
{% include "footer" %} {% endcomment %}
