mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem - plan cards on the studio upgrade screen do not match recent plan cards updates to the pricing page - add-on illustrations on the pricing page sometimes show the light image in dark mode - spend cap bars on the pricing page flash when a user toggles the spend cap ## Solution - changes the upgrade screen plan cards to the pricing page design + shows enterprise as a fourth column - moves the lifted card style to the current plan of the organization + gives it a neutral "current plan" badge - moves the compare plans and pricing faq links below the plan cards + removes the stagger animation on the cards - changes the pricing page illustrations to pick the light or dark image with css because the server render does not know the theme - changes the spend cap animation to resize the bars instead of remounting them
14 lines
386 B
TypeScript
14 lines
386 B
TypeScript
export const getLiftedSide = ({
|
|
index,
|
|
liftedIndex,
|
|
}: {
|
|
index: number
|
|
liftedIndex: number
|
|
}): 'left' | 'right' | undefined => {
|
|
// findIndex gives -1 when no card is lifted, so index 0 must not count as its neighbor
|
|
if (liftedIndex === -1) return undefined
|
|
if (index === liftedIndex - 1) return 'right'
|
|
if (index === liftedIndex + 1) return 'left'
|
|
return undefined
|
|
}
|