mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 15:49:09 +03:00
7 files changed
+43
-28
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ const Home = ({ user }) => {
|
||||
* Read more on https://supabase.com/docs/reference/javascript/reset-password-email#notes
|
||||
*/
|
||||
let url = window.location.hash;
|
||||
let query = url.substr(1);
|
||||
let query = url.slice(1);
|
||||
let result = {};
|
||||
|
||||
query.split("&").forEach((part) => {
|
||||
|
||||
@@ -17,25 +17,33 @@ const ComputeSizeSelection: FC<Props> = ({ computeSizes, selectedComputeSize, on
|
||||
</p>
|
||||
</div>
|
||||
<Radio.Group type="cards" className="billing-compute-radio">
|
||||
{computeSizes.map((option: any) => (
|
||||
<Radio
|
||||
hidden
|
||||
key={option.id}
|
||||
align="vertical"
|
||||
label={option.name}
|
||||
// @ts-ignore
|
||||
description={
|
||||
<div>
|
||||
<p>{option.description}</p>
|
||||
<p>{option.metadata.features}</p>
|
||||
</div>
|
||||
}
|
||||
value={option.id}
|
||||
optionalLabel={<div>${option.prices[0].unit_amount / 100} / month</div>}
|
||||
checked={selectedComputeSize?.id === option.id}
|
||||
onChange={() => onSelectOption(option)}
|
||||
/>
|
||||
))}
|
||||
{computeSizes.map((option: any) => {
|
||||
const defaultPriceId = option.metadata.default_price_id
|
||||
const price =
|
||||
defaultPriceId !== undefined
|
||||
? option.prices.find((price: any) => price.id === defaultPriceId).unit_amount
|
||||
: option.prices[0].unit_amount
|
||||
|
||||
return (
|
||||
<Radio
|
||||
hidden
|
||||
key={option.id}
|
||||
align="vertical"
|
||||
label={option.name}
|
||||
// @ts-ignore
|
||||
description={
|
||||
<div>
|
||||
<p>{option.description}</p>
|
||||
<p>{option.metadata.features}</p>
|
||||
</div>
|
||||
}
|
||||
value={option.id}
|
||||
optionalLabel={<div>${price / 100} / month</div>}
|
||||
checked={selectedComputeSize?.id === option.id}
|
||||
onChange={() => onSelectOption(option)}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</Radio.Group>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -4,11 +4,17 @@ export const formSubscriptionUpdatePayload = (
|
||||
selectedPaymentMethod: string,
|
||||
region: string
|
||||
) => {
|
||||
const defaultPriceId = selectedTier.metadata?.default_price_id
|
||||
const price =
|
||||
defaultPriceId !== undefined
|
||||
? selectedTier.prices.find((price: any) => price.id === defaultPriceId).id
|
||||
: selectedTier.prices[0].id
|
||||
|
||||
const addons =
|
||||
region === 'af-south-1' || !selectedComputeSize.id ? [] : [selectedComputeSize.prices[0].id]
|
||||
const proration_date = Math.floor(Date.now() / 1000)
|
||||
return {
|
||||
tier: selectedTier.prices[0].id,
|
||||
tier: price,
|
||||
addons,
|
||||
proration_date,
|
||||
payment_method: selectedPaymentMethod,
|
||||
|
||||
@@ -101,8 +101,9 @@ function convertArgumentTypes(value: string) {
|
||||
if (isEmpty(value) || !items || items?.length == 0) return { value: [] }
|
||||
const temp = items.map((x) => {
|
||||
const str = x.trim()
|
||||
const name = str.substr(0, str.indexOf(' '))
|
||||
const type = str.substr(str.indexOf(' ') + 1)
|
||||
const space = str.indexOf(' ')
|
||||
const name = str.slice(0, space !== 1 ? space : 0)
|
||||
const type = str.slice(space + 1)
|
||||
return { name, type }
|
||||
})
|
||||
return { value: temp }
|
||||
|
||||
@@ -34,7 +34,7 @@ const PageConfig = () => {
|
||||
let rpcs: any = {}
|
||||
|
||||
Object.entries(paths || []).forEach(([name, val]) => {
|
||||
let trimmed = name.substr(1)
|
||||
let trimmed = name.slice(1)
|
||||
let id = trimmed.replace(functionPath, '')
|
||||
let displayName = id.replace(/_/g, ' ')
|
||||
let camelCase = snakeToCamel(id)
|
||||
|
||||
@@ -865,7 +865,7 @@ pages:
|
||||
isSpotlight: true
|
||||
js: |
|
||||
```js
|
||||
const { data, error } = supabase.auth.api
|
||||
const { data, error } = await supabase.auth.api
|
||||
.resetPasswordForEmail('user@email.com')
|
||||
```
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ const data: CommunityItem[] = [
|
||||
},
|
||||
{
|
||||
title: 'GitHub',
|
||||
stat: '28,000+',
|
||||
stat: '30,000+',
|
||||
statLabel: 'GitHub stars',
|
||||
img: 'github.png',
|
||||
invertImgDarkMode: true,
|
||||
@@ -43,7 +43,7 @@ const data: CommunityItem[] = [
|
||||
},
|
||||
{
|
||||
title: 'Twitter',
|
||||
stat: '25,000+',
|
||||
stat: '26,000+',
|
||||
statLabel: 'Followers',
|
||||
img: 'twitter.png',
|
||||
detail: () => (
|
||||
@@ -54,7 +54,7 @@ const data: CommunityItem[] = [
|
||||
},
|
||||
{
|
||||
title: 'Discord',
|
||||
stat: '5,000+',
|
||||
stat: '6,000+',
|
||||
statLabel: 'SuperTroopers',
|
||||
img: 'discord.png',
|
||||
detail: () => (
|
||||
|
||||
Reference in new issue
Block a user