✨(frontend) display email if no username
Fallback to email if no username is defined for logged user.
This commit is contained in:
@@ -10,6 +10,7 @@ and this project adheres to
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- ✨(frontend) display email if no username #562
|
||||||
- 🧑💻(oidc) add ability to pull registration ID (e.g. SIRET) from OIDC #577
|
- 🧑💻(oidc) add ability to pull registration ID (e.g. SIRET) from OIDC #577
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const AccountDropdown = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { userData, logout } = useAuthStore();
|
const { userData, logout } = useAuthStore();
|
||||||
|
|
||||||
const userName = userData?.name || t('No Username');
|
const userName = userData?.name || userData?.email || t('No Username');
|
||||||
return (
|
return (
|
||||||
<DropButton
|
<DropButton
|
||||||
button={
|
button={
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ describe('AccountDropdown', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
renderAccountDropdown();
|
renderAccountDropdown();
|
||||||
expect(screen.getByText('No Username')).toBeInTheDocument();
|
expect(screen.getByText('test@example.com')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('opens the dropdown and shows logout button when clicked', async () => {
|
it('opens the dropdown and shows logout button when clicked', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user