mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00: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:
@@ -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 %>
|
||||
|
||||
@@ -8,6 +8,7 @@ en:
|
||||
assets: Assets
|
||||
debts: Debts
|
||||
greeting: Welcome back, %{name}
|
||||
fallback_greeting: Welcome back, friend
|
||||
import: Import
|
||||
income: Income
|
||||
investing: Investing (coming soon...)
|
||||
|
||||
Reference in New Issue
Block a user