🌐 Front: add i18n for anonymous users
This commit is contained in:
committed by
ericlinagora
parent
de0dd72f17
commit
1f32311284
@@ -5,7 +5,7 @@ export function getFullName(user: Pick<UserType, 'username' | 'first_name' | 'la
|
||||
let name: string = user?.username;
|
||||
|
||||
if (!name) {
|
||||
return 'Anonymous';
|
||||
return Languages.t('general.user.anonymous');
|
||||
}
|
||||
// @author https://stackoverflow.com/a/17200679
|
||||
const toNameCase = (str?: string) => (str || '').toLowerCase().replace(/(?<!\p{L})\p{L}(?=\p{L}{2})/gu, (m: string) => m.toUpperCase());
|
||||
|
||||
Reference in New Issue
Block a user