diff options
Diffstat (limited to 'opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js b/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js index 3992c00f..70f5b884 100644 --- a/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js +++ b/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js @@ -1,13 +1,9 @@ import React from 'react' -import { useUser } from '../../auth' +import { useAuth } from '../../auth' function ProfileName() { - const user = useUser() - return ( - <span> - {user.givenName} {user.familyName} - </span> - ) + const { isLoading, user } = useAuth() + return isLoading ? <span>Loading...</span> : <span>{user.name}</span> } export default ProfileName |
