Skip to content

Commit

Permalink
fix profile card popup (#25027)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnojima committed May 31, 2022
1 parent 89c376f commit cd9b9b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shared/common-adapters/profile-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const ProfileCard = ({
fullname: userDetailsFullname,
} = userDetails
React.useEffect(() => {
userDetailsState === 'error' &&
userDetailsState === 'unknown' &&
dispatch(Tracker2Gen.createShowUser({asTracker: false, skipNav: true, username}))
}, [dispatch, username, userDetailsState])
// signal layout change when it happens, to prevent popup cutoff.
Expand Down
2 changes: 1 addition & 1 deletion shared/constants/tracker2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const noDetails = Object.freeze<Types.Details>({
reason: '',
resetBrokeTrack: false,
showTracker: false,
state: 'checking',
state: 'unknown',
stellarHidden: false,
teamShowcase: emptyArray,
username: '',
Expand Down
9 changes: 8 additions & 1 deletion shared/constants/types/tracker2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ export type Assertion = {
wotProof?: RPCTypes.WotProof
}

export type DetailsState = 'checking' | 'valid' | 'broken' | 'needsUpgrade' | 'error' | 'notAUserYet'
export type DetailsState =
| 'checking'
| 'valid'
| 'broken'
| 'needsUpgrade'
| 'error'
| 'notAUserYet'
| 'unknown'

export type Details = {
assertions?: Map<string, Assertion>
Expand Down

0 comments on commit cd9b9b2

Please sign in to comment.