Skip to content

Commit

Permalink
fix: CSV processing loading state UI
Browse files Browse the repository at this point in the history
  • Loading branch information
endoooo committed Oct 26, 2023
1 parent 0b2e14c commit 3fa42dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/lanttern_web/live/students_import_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ defmodule LantternWeb.StudentsImportLive do
<.button type="button" phx-click={JS.push("import", loading: "#import-loading")}>
Import
</.button>
<div id="import-loading" class="flex items-center gap-4 text-ltrn-subtle">
<.ping class="hidden phx-click-loading:block" /> Processing CSV file...
<div
id="import-loading"
class="hidden items-center gap-4 text-ltrn-subtle phx-click-loading:flex"
>
<.ping /> Processing CSV file...
</div>
</div>
</.steps>
Expand Down
7 changes: 5 additions & 2 deletions lib/lanttern_web/live/teachers_import_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ defmodule LantternWeb.TeachersImportLive do
<.button type="button" phx-click={JS.push("import", loading: "#import-loading")}>
Import
</.button>
<div id="import-loading" class="flex items-center gap-4 text-ltrn-subtle">
<.ping class="hidden phx-click-loading:block" /> Processing CSV file...
<div
id="import-loading"
class="hidden items-center gap-4 text-ltrn-subtle phx-click-loading:flex"
>
<.ping /> Processing CSV file...
</div>
</div>
</.steps>
Expand Down

0 comments on commit 3fa42dc

Please sign in to comment.