refactor: remove unnecessary console logs in asset management and thumbnail fetching

This commit is contained in:
2025-08-25 18:16:02 +05:30
parent 358ce22767
commit 6026c3b82b
2 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ const AssetManagement = () => {
// Use Promise.all to handle all async operations // Use Promise.all to handle all async operations
await Promise.all(allAssets.map(async (asset: any) => { await Promise.all(allAssets.map(async (asset: any) => {
console.log('asset: ', asset);
if (asset.eventData.type === "Storage" || asset.eventData.type === "Human") return; if (asset.eventData.type === "Storage" || asset.eventData.type === "Human") return;
const assetImage = await getAsset(asset.assetId); const assetImage = await getAsset(asset.assetId);
@@ -130,7 +130,7 @@ const AssetManagement = () => {
{expandedAssetId === asset.id ? {expandedAssetId === asset.id ?
<> <>
<div className="drop-icon" onClick={() => setExpandedAssetId(null)}></div> <div className="drop-icon" onClick={() => setExpandedAssetId(null)}></div>
<img className='asset-image' src={asset.image} alt="" onClick={() => { console.log(asset.image) }} /> <img className='asset-image' src={asset.image} alt="" />
</> </>
: :
<div className="icon"><ForkLiftIcon /></div> <div className="icon"><ForkLiftIcon /></div>

View File

@@ -1,7 +1,7 @@
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
export const getAssetThumbnail = async (assetId: String) => { export const getAssetThumbnail = async (assetId: String) => {
console.log('assetId: ', assetId);
try { try {
const response = await fetch( const response = await fetch(
`${url_Backend_dwinzo}/api/v2/getAssetThumbnail/${assetId}`, `${url_Backend_dwinzo}/api/v2/getAssetThumbnail/${assetId}`,
@@ -24,10 +24,10 @@ export const getAssetThumbnail = async (assetId: String) => {
throw new Error("Failed to fetch assets"); throw new Error("Failed to fetch assets");
} }
// console.log('response: ', response); //
return await response.json(); return await response.json();
} catch (error: any) { } catch (error: any) {
echo.error("Failed to get asset image"); echo.error("Failed to get asset image");
console.log(error.message);
} }
}; };