Skip to content

Commit

Permalink
Fix amerstand in welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
caleballdrin committed Oct 7, 2024
1 parent 08b5156 commit 1579694
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/components/Dashboard/Welcome/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ const Welcome = ({ firstName }: Props): ReactElement => {
const { appName } = useGetAppSettings();
const currentHour = today.hour;

let greeting = firstName
? t('Good Evening, {{ firstName }}.', { firstName })
: t('Good Evening,');
let greeting = t('Good Evening,') + (firstName ? ` ${firstName}.` : '');

if (currentHour < 12) {
greeting = firstName
? t('Good Morning, {{ firstName }}.', { firstName })
: t('Good Morning,');
greeting = t('Good Morning,') + (firstName ? ` ${firstName}.` : '');
} else if (currentHour < 18) {
greeting = firstName
? t('Good Afternoon, {{ firstName }}.', { firstName })
: t('Good Afternoon,');
greeting = t('Good Afternoon,') + (firstName ? ` ${firstName}.` : '');
}

return (
Expand Down

0 comments on commit 1579694

Please sign in to comment.