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

image[0] not defined #20

Open
Green-Thanos opened this issue Nov 4, 2020 · 4 comments
Open

image[0] not defined #20

Green-Thanos opened this issue Nov 4, 2020 · 4 comments

Comments

@Green-Thanos
Copy link

@ line 23 src/header.js
cannot read property url of undefined
user?.image[0].url

@louis2688
Copy link

Having the same issue.

@KamalEzzikouri
Copy link

you need to do something like this:
in your Header.js:
const User_Image= user?.images[0]?.url ? user?.images[0]?.url : "https://static.thenounproject.com/png/17241-200.png";
and after that:

 <Avatar className="header__Avatar"  alt={user?.display_name}
                    src={User_Image} />
                    <h3 className="header__Username__Title">
                        {user?.display_name}
                    </h3>

@ashlex21
Copy link

I know the problem and guess what solution too
you guys must've set item : "" instead of item : null
fix that and you're good to go

and one more thing pass the spotify prop in footer in player.js too!!

@githubsayan7776969
Copy link

mine is set to null still same issue

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

No branches or pull requests

5 participants