1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 04:55:20 +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"> <header class="flex items-center justify-between">
<div> <div>
<h1 class="sr-only"><%= t(".title") %></h1> <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? %> <% unless @accounts.blank? %>
<p class="text-gray-500 text-sm"><%= t(".subtitle") %></p> <p class="text-gray-500 text-sm"><%= t(".subtitle") %></p>
<% end %> <% end %>

View file

@ -8,6 +8,7 @@ en:
assets: Assets assets: Assets
debts: Debts debts: Debts
greeting: Welcome back, %{name} greeting: Welcome back, %{name}
fallback_greeting: Welcome back, friend
import: Import import: Import
income: Income income: Income
investing: Investing (coming soon...) investing: Investing (coming soon...)