-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: redirect user to account info tab after registration
- Loading branch information
Showing
6 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/sections/account/account-info-section/AccountInfoSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Table } from '@iqss/dataverse-design-system' | ||
import { useSession } from '@/sections/session/SessionContext' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
// TODO - Add verified email icon | ||
// TODO - Edit account information | ||
// TODO - Change password | ||
|
||
export const AccountInfoSection = () => { | ||
const { t } = useTranslation('account', { keyPrefix: 'info' }) | ||
const { user } = useSession() | ||
|
||
return ( | ||
<Table striped={false} bordered={false} borderless> | ||
<tbody> | ||
<tr> | ||
<th scope="row">{t('username')}</th> | ||
<td>{user?.identifier}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{t('givenName')}</th> | ||
<td>{user?.firstName}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{t('familyName')}</th> | ||
<td>{user?.lastName}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">{t('email')}</th> | ||
<td>{user?.email}</td> | ||
</tr> | ||
</tbody> | ||
</Table> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters