Bob AI: make the metrics section show only 2 metrics: play...
This commit is contained in:
@@ -43,12 +43,14 @@ const AboutMetric = ({
|
||||
const theme = useTheme();
|
||||
const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
|
||||
|
||||
const filteredMetrics = metrics.filter(metric => metric.label === 'players' || metric.label === 'countries');
|
||||
|
||||
const gridColsMap = {
|
||||
2: "md:grid-cols-2",
|
||||
3: "md:grid-cols-3",
|
||||
4: "md:grid-cols-4",
|
||||
};
|
||||
const gridCols = gridColsMap[metrics.length as keyof typeof gridColsMap] || "md:grid-cols-4";
|
||||
const gridCols = gridColsMap[filteredMetrics.length as keyof typeof gridColsMap] || "md:grid-cols-4";
|
||||
|
||||
return (
|
||||
<section
|
||||
@@ -64,7 +66,7 @@ const AboutMetric = ({
|
||||
/>
|
||||
|
||||
<div className={cls("grid grid-cols-1 gap-6", gridCols, metricsContainerClassName)}>
|
||||
{metrics.map((metric, index) => {
|
||||
{filteredMetrics.map((metric, index) => {
|
||||
const Icon = metric.icon;
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user