Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files
components/SimulationGraph.tsx
CHANGED
|
@@ -111,6 +111,12 @@ const SimulationGraph: React.FC<SimulationGraphProps> = ({ isBuilding, societyTy
|
|
| 111 |
const idx = roles.indexOf(n.role);
|
| 112 |
return idx >= 0 ? idx : (n.role ? n.role.length % 5 : 0);
|
| 113 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
return n.connections || 0;
|
| 115 |
});
|
| 116 |
|
|
|
|
| 111 |
const idx = roles.indexOf(n.role);
|
| 112 |
return idx >= 0 ? idx : (n.role ? n.role.length % 5 : 0);
|
| 113 |
}
|
| 114 |
+
if (viewMode === 'Country') {
|
| 115 |
+
const countries = ["United States", "United Kingdom", "Netherlands", "France", "India"];
|
| 116 |
+
const loc = n.location || '';
|
| 117 |
+
const idx = countries.findIndex(c => loc.includes(c));
|
| 118 |
+
return idx >= 0 ? idx : (loc ? loc.length % 5 : 0);
|
| 119 |
+
}
|
| 120 |
return n.connections || 0;
|
| 121 |
});
|
| 122 |
|