Skip to content

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

Merge branch 'master' into feat/sticky-header-usage

Jonathan Summers-Muir787237551192
diff --cc studio/components/interfaces/BillingV2/Usage/Usage.tsx
index 9efcc274bef,d96a78e9292..d78ad1185f2
--- a/studio/components/interfaces/BillingV2/Usage/Usage.tsx
+++ b/studio/components/interfaces/BillingV2/Usage/Usage.tsx
@@@ -63,49 -57,24 +63,50 @@@ const Usage = () =>
const subscriptionTierId = subscription?.tier?.supabase_prod_id
const usageBillingEnabled =
- subscriptionTierId === PRICING_TIER_PRODUCT_IDS.FREE || PRICING_TIER_PRODUCT_IDS.PRO
+ subscriptionTierId !== PRICING_TIER_PRODUCT_IDS.FREE &&
+ subscriptionTierId !== PRICING_TIER_PRODUCT_IDS.PRO
- const scrollTo = (id: 'infra' | 'bandwidth' | 'sizeCount' | 'activity') => {
+ const scrollTo = (id: usageSectionIds) => {
switch (id) {
case 'infra':
- if (infrastructureRef.current)
- infrastructureRef.current.scrollIntoView({ behavior: 'smooth' })
+ if (infrastructureRef.current) {
+ infrastructureRef.current.scrollIntoView({
+ behavior: 'smooth',
+ block: 'start', // or 'end' to scroll to the bottom
+ inline: 'start', //
+ })
+ setActiveTab('infra')
+ }
break
case 'bandwidth':
- if (bandwidthRef.current) bandwidthRef.current.scrollIntoView({ behavior: 'smooth' })
+ if (bandwidthRef.current) {
+ bandwidthRef.current.scrollIntoView({
+ behavior: 'smooth',
+ block: 'start', // or 'end' to scroll to the bottom
+ inline: 'start', //
+ })
+ setActiveTab('bandwidth')
+ }
break
case 'sizeCount':
- if (sizeAndCountsRef.current)
- sizeAndCountsRef.current.scrollIntoView({ behavior: 'smooth' })
+ if (sizeAndCountsRef.current) {
+ sizeAndCountsRef.current.scrollIntoView({
+ behavior: 'smooth',
+ block: 'start', // or 'end' to scroll to the bottom
+ inline: 'start', //
+ })
+ setActiveTab('sizeCount')
+ }
break
case 'activity':
- if (activityRef.current) activityRef.current.scrollIntoView({ behavior: 'smooth' })
+ if (activityRef.current) {
+ activityRef.current.scrollIntoView({
+ behavior: 'smooth',
+ block: 'start', // or 'end' to scroll to the bottom
+ inline: 'start', //
+ })
+ setActiveTab('activity')
+ }
break
}
}