Skip to content

Commit

Permalink
feat: strint trimming on posts
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipeR13 committed Oct 29, 2024
1 parent a37fdcd commit 7c4864b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/atomic_web/components/activity.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule AtomicWeb.Components.Activity do
</div>
<h2 class="mt-3 text-base font-semibold text-gray-900"><%= @activity.title %></h2>
<div class="text-justify text-sm text-gray-700">
<p><%= @activity.description %></p>
<p><%= maybe_slice_string(@activity.description, 300) %></p>
</div>
<!-- Image -->
<%= if @activity.image do %>
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/components/announcement.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule AtomicWeb.Components.Announcement do
</div>
<h2 class="mt-3 text-base font-semibold text-gray-900"><%= @announcement.title %></h2>
<div class="space-y-4 text-justify text-sm text-gray-700">
<%= @announcement.description %>
<%= maybe_slice_string(@announcement.description, 300) %>
</div>
<!-- Image -->
<%= if @announcement.image do %>
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/live/home_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ defmodule AtomicWeb.HomeLive.Index do
%{daily: Enum.take(daily, 3), weekly: Enum.take(weekly, 3)}
end

defp fetch_default_schedule() do
defp fetch_default_schedule do
{daily, weekly} =
Activities.list_activities(preloads: [:organization], order_by: [desc: :start])
|> Enum.reduce({[], []}, &process_activity/2)
Expand Down

0 comments on commit 7c4864b

Please sign in to comment.