🐛 41 - fix token import - #59
Conversation
| import useAuthContext from '../global/hooks/useAuthContext'; | ||
| import { UserWithId } from '../global/types'; | ||
|
|
||
| const getDisplayName = (user?: UserWithId) => { |
There was a problem hiding this comment.
is user truly conditional? There are cases where we just want "Hello" returned?
There was a problem hiding this comment.
that is a very good question
There was a problem hiding this comment.
just remembered, i put this in to handle the possibility of empty names, and empty email from a user. in ego ui, we're going to display the user.id in the default case...but i thought that would look weird here. will double check with @b-f-chan
There was a problem hiding this comment.
confirmed to keep it as just Hello if email and names are not present (no email will be a possibility in future ego). will keep the optional user because typescript was complaining
ciaranschutte
left a comment
There was a problem hiding this comment.
lgtm but for sure check with Jon about the logic

Replace argo token utils with generic jwt lib
Correct token and user Types
Add conditional user display name