dsg
Copy This

Warning: file_get_contents(/home/u340524018/domains/agniaga.com/public_html/sub/u2/creator/view-user-profile.js): Failed to open stream: No such file or directory in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/inc.filehtml.php on line 319
async function renderProfileData(cachedData, userId) {
    // if (!refreshed && !cachedData) {
    // }

    refreshed = false

    if (!cachedData) {
        const data = await getUserById(userId)
        console.log(\'User data:\', data);

        if (!data || data.error) {
            $(\'.loading-fullscreen\').hide()
            app.dialog.alert(\'User not found\', \'Error\')

            view.router.back(view.history[0], {
                force: true
            })
            return
        }

        const garage = await getUserGarage(userId)

        if (garage) {
            createGarageContent(garage, \'.pview-current-vehicles-list\', \'.pview-past-vehicles-list\')
        }

        // Assuming `path` is a dynamic path like \'/garage/2\'
        store.dispatch(\'setPathData\', {
            path: `/user/${userId}`,
            data: {
                user: data.user,
                garage: garage,
            },
        })

        displayProfile(data.user, \'profile-view\')
    } else {
        displayProfile(cachedData.user, \'profile-view\')

        if (cachedData.garage) {
            createGarageContent(cachedData.garage, \'.pview-current-vehicles-list\', \'.pview-past-vehicles-list\')
        }
    }

    $(\'.loading-fullscreen\').hide()
}
Array
(
)
Add JS Function Name