<div class="row">
  <div class="col s12 m10 l10 offset-l1">
    <%= render 'filter' %>
      <h2 class="flow-text">Upcoming Events</h2>
        <table class="striped">
          <thead>
            <tr>
              <th class="flow-text">Start Date</th>
              <th class="flow-text">End Time</th>
            </tr>
          </thead>
        </table>
			<% @events.each do |event| %>
        <% if available?(event) %>
  		 		<table class="striped">
  			 		<tbody>
  				 		<tr>
  						 <td>  <%= "#{event.city}, #{event.state}" %> </thead>
                <td><%= (Geocoder::Calculations.distance_between(event, current_user)).ceil %> miles away.</td>
  						  <td> <%= date_time_helper(event.start_date_time) %></td>
  						  <td><%= date_time_helper(event.end_date_time) %></td>
  						  <div class="class-action ">
  						    <td><%= link_to('Details', event_path(event), ) %></td>
  						  </div>
  						 </tr>
  					</tbody>
  				<br>
  		    </table>
        <% end %>
      <% end %>
    </div>
  </div>


<div class="row">
  <div class="col s12 m10 l10 offset-l1">
  <% if user_signed_in? %>
    <%= render 'filter' %>
  <% end %>
      <h2 class="flow-text">Upcoming Events</h2>
        <table class="striped">
          <thead>
            <tr>
              <th class="flow-text">Start Date</th>
              <th class="flow-text">End Time</th>
            </tr>
          </thead>
        </table>
			<% @events.each do |event| %>
        <% if available?(event) %>
  		 		<table class="striped">
  			 		<tbody>
  				 		<tr>
  						 <td>  <%= "#{event.city}, #{event.state}" %> </thead>
                <% if user_signed_in? %>
                  <td><%= (Geocoder::Calculations.distance_between(event, current_user)).ceil %> miles away.</td>
                <%  end %>
  						  <td> <%= date_time_helper(event.start_date_time) %></td>
  						  <td><%= date_time_helper(event.end_date_time) %></td>
  						  <div class="class-action ">
  						    <td><%= link_to('Details', event_path(event), ) %></td>
  						  </div>
  						 </tr>
  					</tbody>
  				<br>
  		    </table>
        <% end %>
      <% end %>
    </div>
  </div>


Remove filtering and distance show from the event index if a user is not signed in
Remove filtering and distance show from the event index if a user is not signed in
