Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Change the way bg color is passed to bar charts

Joshen Lim41870a796dbf
diff --git a/www/data/BetaPage.js b/www/data/BetaPage.js
index a6e0b19cc94..ea740af7dab 100644
--- a/www/data/BetaPage.js
+++ b/www/data/BetaPage.js
@@ -169,16 +169,16 @@ export const PerformanceComparisonData = [
key: 'read',
title: 'Read (requests/s)',
stats: [
- { name: 'Supabase', value: 1167, color: 'bg-brand-600 dark:bg-brand-700' },
- { name: 'Firestore', value: 366, color: 'bg-dark-300 dark:bg-dark-400' },
+ { name: 'Supabase', value: 1167 },
+ { name: 'Firestore', value: 366 },
]
},
{
key: 'write',
title: 'Write (requests/s)',
stats: [
- { name: 'Supabase', value: 870, color: 'bg-brand-600 dark:bg-brand-700' },
- { name: 'Firestore', value: 280, color: 'bg-dark-300 dark:bg-dark-400' },
+ { name: 'Supabase', value: 870 },
+ { name: 'Firestore', value: 28 },
]
}
]
diff --git a/www/pages/beta.tsx b/www/pages/beta.tsx
index 1b846554ee7..d2f5d7fc1f6 100644
--- a/www/pages/beta.tsx
+++ b/www/pages/beta.tsx
@@ -271,12 +271,10 @@ const Performance = () => {
{metric.stats.map((stat: any, idx: number) => (
<div key={`metric_${metric.key}_${idx}`} className="flex items-center">
<p className="w-20 lg:w-24 border-r py-2 pr-4 mr-4 text-left sm:text-right">{stat.name}</p>
- {/* Default bar without anim below if something goes wrong */}
- {/* <div
- className={`${stat.color} rounded-full h-3 transition-all`}
- style={{ width: `calc(${((stat.value / maxValue) * 100)}%)`}}
- /> */}
- <Bar color={stat.color} finalPercentage={Math.ceil((stat.value / maxValue) * 100)} />
+ <Bar
+ color={stat.name === 'Supabase' ? 'bg-brand-600 dark:bg-brand-700' : 'bg-dark-300 dark:bg-dark-400'}
+ finalPercentage={Math.ceil((stat.value / maxValue) * 100)}
+ />
<p className="ml-2">{stat.value}/s</p>
</div>
))}