<commit_before><!-- TODO - add active class! -->
<ul class="sidebar">
  <% if user_signed_in? %>
      <li><%= link_to 'My Profile', edit_user_path(current_user) %></li>
  <% end %>
  <li><%= link_to 'Home', welcome_index_path %></li>

  <!-- TODO - This should only display if a user has registered for events. The second part of this if statement doesn't work. -->
  <% if user_signed_in? && current_user&.current_events&.present? %>
    <li><u>Registered Events</u></li>
    <% current_user&.user_events&.each do |registration| %>
      <% unless registration.past %>
          <li><%= link_to "#{registration.event.name}", event_user_event_path(registration.event, registration) %></li>
      <% end %>
    <% end %>
    <hr/>
  <% end %>

  <% if user_signed_in? && current_user.admin? %><commit_msg>Make `My Profile` go to `user#show` instead of `#edit`<commit_after><!-- TODO - add active class! -->
<ul class="sidebar">
  <% if user_signed_in? %>
      <li><%= link_to 'My Profile', user_path(current_user) %></li>
  <% end %>
  <li><%= link_to 'Home', welcome_index_path %></li>

  <!-- TODO - This should only display if a user has registered for events. The second part of this if statement doesn't work. -->
  <% if user_signed_in? && current_user&.current_events&.present? %>
    <li><u>Registered Events</u></li>
    <% current_user&.user_events&.each do |registration| %>
      <% unless registration.past %>
          <li><%= link_to "#{registration.event.name}", event_user_event_path(registration.event, registration) %></li>
      <% end %>
    <% end %>
    <hr/>
  <% end %>

  <% if user_signed_in? && current_user.admin? %>
{'fraction_non_alphanumeric': 0.18469015795868773, 'fraction_numerical': 0.0, 'mean_word_length': 3.5623268698060944, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2869170', 'n_tokens_mistral': 581, 'n_tokens_neox': 525, 'n_words': 138}