Cloning rarible Logout, Close, profile and Save button not working and profile photo not display ,,, please can you help

cloning rarible Logout, Close, profile and Save button not working and profile photo not display, any help please
.js code

Moralis.initialize(“YykBOopEziNqEcaJuyISHV3LbXYBfO1O9CMi6dDm”);

Moralis.serverURL = ‘https://uz9jpvslyldb.moralishost.com:2053/server

init = async () => {

hideElement(userInfo);

hideElement(createItemForm);

window.web3 = await Moralis.Web3.enable();

initUser();

}

initUser = async () => {

if (await Moralis.User.current()){

    hideElement(userConnectButton);

    showElement(userProfileButton);

    showElement(openCreateItemButton);

}else{

    showElement(userConnectButton);

    hideElement(userProfileButton);

    hideElement(openCreateItemButton);

}

}

login = async () => {

try {

    await Moralis.Web3.authenticate();

    initUser();

} catch (error) {

    alert(error)

}

}

logout = async () => {

await Moralis.User.logOut();

hideElement(userInfo);

initUser();

}

openUserInfo = async () => {

user = await Moralis.User.current();

if (user){

    const email = user.get('email');

    if(email){

        userEmailField.value = email;

    }else{

        userEmailField.value = "";

    }

    userUsernameField.value = user.get('username');

    const userAvatar = user.get('avatar');

    if(userAvatar){

        userAvatarImg.src = userAvatar.url();

        showElement(userAvatarImg);

    }else{

        hideElement(userAvatarImg);

    }

    showElement(userinfo);

}else{

    login();

}

}

saveUserInfo = async () => {

user.set('email', userEmailField.value);

user.set('username', userUsernameField.value);

if (userAvatarFile.files.length > 0) {

    const avatar = new Moralis.File("avatar.jpg", userAvatarFile.Files[0]);

    user.set('avatar', avatar);

}

await user.save();

alert("User info saved successfully!");

openUserInfo();

}

hideElement = (element) => element.style.display = “none”;

showElement = (element) => element.style.display = “block”;

const userConnectButton = document.getElementById(“btnConnect”);

userConnectButton.onclick = login;

const userProfileButton = document.getElementById(“btnUserInfo”);

userProfileButton.onlick = openUserInfo;

const userInfo = document.getElementById(“UserInfo”);

const userUsernameField = document.getElementById(“txtUsername”);

const userEmailField = document.getElementById(“txtEmail”);

const userAvatarImg = document.getElementById(“imgAvatar”);

const userAvatarFile = document.getElementById(“fileAvatar”);

document.getElementById(“btnCloseUserInfo”).onclick = () => hideElement(userInfo);

document.getElementById(“btnLogout”).onclick = logout;

document.getElementById(“btnSaveUserInfo”).onclick = saveUserInfo;

const createItemform = document.getElementById(“CreateItem”);

const createItemNameField = document.getElementById(“txtCreateItemName”);

const txtCreateItemDescriptionField = document.getElementById(“txtCreateItemDescription”);

const createItemPriceField = document.getElementById(“numCreateItemPrice”);

const createItemStatusField = document.getElementById(“selectCreateItemStatus”);

const createItemFile = document.getElementById(“fileCreateItemFile”);

const openCreateItemButton = document.getElementById(“btnOpenCreateItem”);

openCreateItemButton.onclick = () => showElement(createItemForm);

document.getElementById(“btnCloseCreateItem”).onclick = () => hideElement(CreateItemForm);

init();

.html

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>inimitable</title>
<div>

    <button id="btnConnect">Connect wallet</button>

    <button id="btnUserInfo">profile</button>

    <button id="btnOpenCreateItem">Create</button>

</div>

<div id="userInfo">

    <h4>User Profile</h4>

    <input type="text" id="txtUsername" required placeholder="Enter username">

    <input type="text" id="txtEmail" placeholder="Enter email">

    <small>Optional</small>

    <img width="50" height="50" src="" id="imgAvatar" alt="">

    <label for="fileAvatar">select Avatar</label>

    <input type="file" id="fileAvatar">

    <button id="btnLogout">Log out</button>

    <button id="btnCloseUserInfo">Close</button>

    <button id="btnSaveUserInfo">Save</button>  

</div>

<div id="createItem">

    <h4>Create Item</h4>

    <input type="text" id="txtCreateItemName" required placeholder="Enter name">

    <textarea id="txtCreateItemDescription" cols="30" rows="5" placeholder="Enter description"></textarea>

    <input type="number" min="1" id="numCreateItemPrice" placeholder="Enter price"required>

    

    <label for="selectCreateItemStatus">Status</label>

    <select id="selectCreateItemStatus">

        <option value="0">Not for sale</option>

        <option value="1">Instant buy</option>

        <option value="2">Accept offers</option>

    </select>

    

    <label for="fileCreateItemFile">select file</label>

    <input type="file" id="fileCreateItemFile">

    <button id="btnCloseCreateItem">Close</button>

    <button id="btnCreateItem">Create!</button>  

</div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>

<script src="https://unpkg.com/moralis/dist/moralis.js"></script>

<script src="main.js"></script>

Hi, you can see here how to post code on forum: READ BEFORE POSTING - How to post code in the forum