1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

fix: default value if user's name isn't set (#1262)

* fix: default value if user's name isn't set

* chore: matched code style

* fix: i18n key for fallback greeting

---------

Co-authored-by: Zach Gollwitzer <zach@maybe.co>
This commit is contained in:
Aaron Meese 2024-10-10 15:03:47 -07:00 committed by GitHub
parent 3399b74849
commit 34ebd96c4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -2,7 +2,9 @@
<header class="flex items-center justify-between">
<div>
<h1 class="sr-only"><%= t(".title") %></h1>
<p class="text-xl font-medium text-gray-900 mb-1"><%= t(".greeting", name: Current.user.first_name ) %></p>
<p class="text-xl font-medium text-gray-900 mb-1">
<%= Current.user.first_name.present? ? t(".greeting", name: Current.user.first_name ) : t(".fallback_greeting") %>
</p>
<% unless @accounts.blank? %>
<p class="text-gray-500 text-sm"><%= t(".subtitle") %></p>
<% end %>