I am unable to get userInfo and profile button not working - CLONE RARIBLE IN 24 HORS

not in the console terminal, use it in your main.js

How do i use console log to see what i have in the variable

Bro i am completely lost :expressionless:

in your main.js file, you write on a line: console.log(variable_name) (you will have to replace variable_name with the name of the variable that you want to print there), but you should do that in the context where that variable is used, like near the lines where it is used

after that you refresh the page, and look on what you will get on your browser console

Okay i will do that now

Is this correct the way i do it?

 if (userAvatar) {
            userAvatarImg.src = userAvatar.url();
            console.log("userAvatarImg");

no, that is after the error will be generated and you didnโ€™t write it well either, you should write console.log(userAvatarImg); and to do that on a line before the error gets generated.

Okay i will do that right away thanks

Is this correct ? @cryptokid

if (userAvatar) {
            console.log(userAvatarImg);
            userAvatarImg.src = userAvatar.url();

it is better, but are you sure that is the line with the error?
asking because I donโ€™t see anything related to the error that you posted: Uncaught (in promise) TypeError: userAvatarImg.url is not a function

You will be on your own until tomorrow.

This is what i get after adding the console.log then i tried to click on save and i got this message after userinfo is saved below in my console

Uncaught (in promise) ReferenceError: user is not defined
    at HTMLButtonElement.saveUserInfo (main.js:82)

But this time around, when i click on save button, nothing happened what i only get was this error in my console

Uncaught (in promise) ReferenceError: user is not defined
    at HTMLButtonElement.saveUserInfo (main.js:82)

@cryptokid

I am very sure it is the line wait let me show you a screenshot of it

Now it doesnโ€™t show the error again but it saying this in my console

Uncaught (in promise) ReferenceError: user is not defined
    at HTMLButtonElement.saveUserInfo (main.js:81)

When i add the console at the top of useAvatarImg.src, the error wonโ€™t show but i get this error below when i clicked on save button

This is the error i got after adding the above console.log

Uncaught (in promise) ReferenceError: user is not defined
    at HTMLButtonElement.saveUserInfo (main.js:82)

@cryptokid

you should define user in some functions, like using let user = await Moralis.User.current(); at the beginning of that function that gives you that error.

When i added it to the beginning of the error at my main .js ()82 line, it shows this error in my console below

@cryptokid

Can you also add a print screen with the error?

Yeah i will add it now

This is the print screen of the error when i tried to save userinfo