dsg
INSERT INTO `cp_filehtml` (`id`,`modul`,`app`,`path`,`type`,`cat`,`file_name`,`content`) VALUES ('475','profile','1','u2/creator','0','js','view-user-profile.js--','async function renderProfileData(cachedData, userId) {\r\n // if (!refreshed && !cachedData) {\r\n // }\r\n\r\n refreshed = false\r\n\r\n if (!cachedData) {\r\n const data = await getUserById(userId)\r\n console.log(\\\\\\\\\\\\\\\'User data:\\\\\\\\\\\\\\\', data);\r\n\r\n if (!data || data.error) {\r\n $(\\\\\\\\\\\\\\\'.loading-fullscreen\\\\\\\\\\\\\\\').hide()\r\n app.dialog.alert(\\\\\\\\\\\\\\\'User not found\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\'Error\\\\\\\\\\\\\\\')\r\n\r\n view.router.back(view.history[0], {\r\n force: true\r\n })\r\n return\r\n }\r\n\r\n const garage = await getUserGarage(userId)\r\n\r\n if (garage) {\r\n createGarageContent(garage, \\\\\\\\\\\\\\\'.pview-current-vehicles-list\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\'.pview-past-vehicles-list\\\\\\\\\\\\\\\')\r\n }\r\n\r\n // Assuming `path` is a dynamic path like \\\\\\\\\\\\\\\'/garage/2\\\\\\\\\\\\\\\'\r\n store.dispatch(\\\\\\\\\\\\\\\'setPathData\\\\\\\\\\\\\\\', {\r\n path: `/user/${userId}`,\r\n data: {\r\n user: data.user,\r\n garage: garage,\r\n },\r\n })\r\n\r\n displayProfile(data.user, \\\\\\\\\\\\\\\'profile-view\\\\\\\\\\\\\\\')\r\n } else {\r\n displayProfile(cachedData.user, \\\\\\\\\\\\\\\'profile-view\\\\\\\\\\\\\\\')\r\n\r\n if (cachedData.garage) {\r\n createGarageContent(cachedData.garage, \\\\\\\\\\\\\\\'.pview-current-vehicles-list\\\\\\\\\\\\\\\', \\\\\\\\\\\\\\\'.pview-past-vehicles-list\\\\\\\\\\\\\\\')\r\n }\r\n }\r\n\r\n $(\\\\\\\\\\\\\\\'.loading-fullscreen\\\\\\\\\\\\\\\').hide()\r\n}');
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