summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-08 13:04:08 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-08 13:04:08 -0600
commit76b083a2bd7e0ab694af3e4fb2504e3869f97113 (patch)
tree93f9f0acf550e22125c340ff29c6ac1ceb4a1f72 /lib
parentcc4679c9ab0bc2607179a26556e3b381a7a2533c (diff)
downloadaggiedit-76b083a2bd7e0ab694af3e4fb2504e3869f97113.tar.gz
aggiedit-76b083a2bd7e0ab694af3e4fb2504e3869f97113.zip
Fix when no upload
Diffstat (limited to 'lib')
-rw-r--r--lib/aggiedit_web/live/post_live/form_component.html.heex10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/aggiedit_web/live/post_live/form_component.html.heex b/lib/aggiedit_web/live/post_live/form_component.html.heex
index 2f0738e..a956cb3 100644
--- a/lib/aggiedit_web/live/post_live/form_component.html.heex
+++ b/lib/aggiedit_web/live/post_live/form_component.html.heex
@@ -27,11 +27,13 @@
</div>
<% end %>
<%= else %>
- <div class="row">
- <div class="column">
- <img style="height:80px" src={Routes.static_path(@socket, "/uploads/#{@post.upload.file}")} />
+ <% if !is_nil(@post.upload) do %>
+ <div class="row">
+ <div class="column">
+ <img style="height:80px" src={Routes.static_path(@socket, "/uploads/#{@post.upload.file}")} />
+ </div>
</div>
- </div>
+ <% end %>
<% end %>
<div>