chore: fix warnings

This commit is contained in:
Zach Daniel 2021-03-15 23:01:43 -04:00
parent 80553bef64
commit bd0ff0d3ed
2 changed files with 2 additions and 8 deletions

View file

@ -75,7 +75,7 @@ defmodule AshAdmin.Components.Resource.DataTable do
<tbody> <tbody>
<tr :for={{record <- data(@data)}} class="text-left border-b-2"> <tr :for={{record <- data(@data)}} class="text-left border-b-2">
<td :for={{attribute <- Ash.Resource.Info.attributes(@resource)}} class="px-4 py-3"> <td :for={{attribute <- Ash.Resource.Info.attributes(@resource)}} class="px-4 py-3">
{{render_attribute(assigns, record, attribute)}} {{render_attribute(record, attribute)}}
</td> </td>
<td :if={{actions?(@resource)}}> <td :if={{actions?(@resource)}}>
<div class="flex h-max justify-items-center"> <div class="flex h-max justify-items-center">
@ -112,7 +112,7 @@ defmodule AshAdmin.Components.Resource.DataTable do
end end
end end
defp render_attribute(assigns, record, attribute) do defp render_attribute(record, attribute) do
if Ash.Type.embedded_type?(attribute.type) do if Ash.Type.embedded_type?(attribute.type) do
"..." "..."
else else

View file

@ -1,11 +1,9 @@
defmodule AshAdmin.Components.Resource do defmodule AshAdmin.Components.Resource do
use Surface.LiveComponent use Surface.LiveComponent
import AshAdmin.Helpers
require Ash.Query require Ash.Query
alias AshAdmin.Components.Resource.{Show, Form, Info, Nav, DataTable} alias AshAdmin.Components.Resource.{Show, Form, Info, Nav, DataTable}
alias Surface.Components.LiveRedirect
# prop hide_filter, :boolean, default: true # prop hide_filter, :boolean, default: true
prop resource, :any, required: true prop resource, :any, required: true
@ -58,10 +56,6 @@ defmodule AshAdmin.Components.Resource do
"#{resource}_create" "#{resource}_create"
end end
defp show_id(resource) do
"#{resource}_show"
end
defp update_id(resource) do defp update_id(resource) do
"#{resource}_update" "#{resource}_update"
end end