Merge version_1 into main #1
@@ -30,9 +30,11 @@ const assetMap = [
|
||||
const resolveAsset = (assetId) => {
|
||||
const asset = assetMap.find(a => a.id === assetId);
|
||||
if (asset) return { url: asset.url, alt: asset.alt || assetId };
|
||||
// Fallback: choose a generic industrial image if specific not found
|
||||
const fallbackAsset = assetMap.find(a => a.category === 'industrial');
|
||||
return { url: fallbackAsset?.url || '', alt: fallbackAsset?.alt || 'Industrial machinery' };
|
||||
// Fallback: if specific asset not found, use a default or empty
|
||||
if (assetMap.length > 0) {
|
||||
return { url: assetMap[0].url, alt: assetMap[0].alt || 'Industrial machinery' };
|
||||
}
|
||||
return { url: '', alt: 'Image not found' };
|
||||
};
|
||||
|
||||
// --- Synthesized Component Definitions (Simplified for demonstration) ---
|
||||
|
||||
Reference in New Issue
Block a user