Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Replace dcl-gatsby Avatar component #1041

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

ncomerci
Copy link
Contributor

This closes #1039

@ncomerci ncomerci requested review from 1emu and andyesp June 22, 2023 17:09
@yemel yemel temporarily deployed to governance-pr-1041 June 22, 2023 17:09 Inactive
@yemel yemel temporarily deployed to governance-pr-1041 June 23, 2023 14:38 Inactive

const { profile, isLoadingProfile } = useProfile(address)

const getTarget = () => {
Copy link
Member

Choose a reason for hiding this comment

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

I'll change this to

  const getTarget = () => {
    if (src) {
      return src
    }

    const avatar = profile?.avatar?.snapshots?.face256 || profile?.avatar?.snapshots?.face
    
    if (failed || !avatar) {
      return DEFAULT_AVATAR
    }

    return avatar
  }

@andyesp andyesp merged commit f0a7963 into master Jun 26, 2023
1 check passed
@andyesp andyesp deleted the refactor/1039-avatar-component branch June 26, 2023 14:11
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.

Replace dcl-gatsby Avatar component
4 participants