Skip to content

🐛 41 - fix token import - #59

Merged
anncatton merged 3 commits into
developfrom
41-fix-token-import
Feb 23, 2021
Merged

anncatton merged 3 commits into
developfrom
41-fix-token-import

Conversation

@anncatton

@anncatton anncatton commented Feb 19, 2021 •

Copy link
Copy Markdown
Contributor

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

import useAuthContext from '../global/hooks/useAuthContext';
import { UserWithId } from '../global/types';

const getDisplayName = (user?: UserWithId) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is user truly conditional? There are cases where we just want "Hello" returned?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a very good question

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ciaranschutte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but for sure check with Jon about the logic

@anncatton
anncatton merged commit 5a8364e into develop Feb 23, 2021
@anncatton
anncatton deleted the 41-fix-token-import branch February 23, 2021 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants