<% if @export.present? %> <% @page_title = "Download Export" %> <% else %> <% @page_title = "Download Expired" %> <% end %> <% content_for :header do %>
<%= back_link_to @user.name, user_path(@user), "keydown.left@document->hotkey#click keydown.esc@document->hotkey#click" %>
<% end %>

<%= @page_title %>

<% if @export.present? %>

Your export is ready. The download should start automatically.

<%= link_to rails_blob_path(@export.file, disposition: "attachment"), id: "download-link", class: "btn btn--link", data: { turbo: false, controller: "auto-click" } do %> Download your data <% end %> <% else %>

That download link has expired. You'll need to <%= link_to "request a new export", user_path(@user), class: "txt-lnk" %>.

<% end %>