summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/containers/auth
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-13 13:00:00 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-17 17:06:49 +0200
commit24147cba0f5723be3525e8f40d1954144841629b (patch)
treed44727504f7a9c579219616cbdba5e965543561a /opendc-web/opendc-web-ui/src/containers/auth
parent4397a959e806bf476be4c81bc804616adf58b969 (diff)
ui: Address technical dept in frontend
Diffstat (limited to 'opendc-web/opendc-web-ui/src/containers/auth')
-rw-r--r--opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js10
1 files changed, 7 insertions, 3 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 291c0068..cbbe42b4 100644
--- a/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js
+++ b/opendc-web/opendc-web-ui/src/containers/auth/ProfileName.js
@@ -1,9 +1,13 @@
import React from 'react'
-import { useSelector } from 'react-redux'
+import { useUser } from '../../auth/hook'
function ProfileName() {
- const name = useSelector((state) => `${state.auth.givenName} ${state.auth.familyName}`)
- return <span>{name}</span>
+ const user = useUser()
+ return (
+ <span>
+ {user.givenName} {user.familyName}
+ </span>
+ )
}
export default ProfileName