mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
Merge pull request #12407 from supabase/fix/al-minor-spelling-fixes
fix: minor spelling fixes
This commit is contained in:
7 files changed
+16
-16
No files matched your search
@@ -45,7 +45,7 @@ const HomePage: NextPage = () => {
|
||||
<>
|
||||
<button onClick={() => supabaseClient.auth.signOut()}>Sign out</button>
|
||||
|
||||
<p> List of Currenly Logged in Users: </p>
|
||||
<p> List of Currently Logged in Users: </p>
|
||||
{Object.keys(userState).map((key) => (
|
||||
<p key={key}>Hi {key}</p>
|
||||
))}
|
||||
|
||||
@@ -113,7 +113,7 @@ functions:
|
||||
notes: |
|
||||
- Requires either an email or phone number.
|
||||
- This method is used for passwordless sign-ins where a OTP is sent to the user's email or phone number.
|
||||
- If the user doesn't exist, `sign_in_with_otp()` will signup the user instead. To restrict this behaviour, you can set `should_create_user` in `SignInWithPasswordlessCredentials.options` to `false`.
|
||||
- If the user doesn't exist, `sign_in_with_otp()` will signup the user instead. To restrict this behavior, you can set `should_create_user` in `SignInWithPasswordlessCredentials.options` to `false`.
|
||||
- If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP.
|
||||
- If you're using phone, you can configure whether you want the user to receive a OTP.
|
||||
- The magic link's destination URL is determined by the [`SITE_URL`](/docs/reference/auth/config#site_url).
|
||||
|
||||
@@ -14,7 +14,7 @@ import CostBreakdownRow from './CostBreakdownRow'
|
||||
import { StripeSubscription } from './Subscription.types'
|
||||
import NoPermission from 'components/ui/NoPermission'
|
||||
import { USAGE_BASED_PRODUCTS } from 'components/interfaces/Billing/Billing.constants'
|
||||
import { ProjectUsagResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { ProjectUsageResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
|
||||
interface Props {
|
||||
project: any
|
||||
@@ -62,7 +62,7 @@ const Subscription: FC<Props> = ({
|
||||
? 0
|
||||
: Object.keys(usage)
|
||||
.map((productKey) => {
|
||||
return usage[productKey as ProjectUsagResponseUsageKeys].cost ?? 0
|
||||
return usage[productKey as ProjectUsageResponseUsageKeys].cost ?? 0
|
||||
})
|
||||
.reduce((prev, current) => prev + current, 0)
|
||||
|
||||
@@ -183,10 +183,10 @@ const Subscription: FC<Props> = ({
|
||||
{isPayg &&
|
||||
USAGE_BASED_PRODUCTS.map((product) => {
|
||||
return product.features.map((feature) => {
|
||||
const amount = usage?.[feature.key as ProjectUsagResponseUsageKeys]?.usage ?? 0
|
||||
const limit = usage?.[feature.key as ProjectUsagResponseUsageKeys]?.limit ?? 0
|
||||
const amount = usage?.[feature.key as ProjectUsageResponseUsageKeys]?.usage ?? 0
|
||||
const limit = usage?.[feature.key as ProjectUsageResponseUsageKeys]?.limit ?? 0
|
||||
const cost = (
|
||||
usage?.[feature.key as ProjectUsagResponseUsageKeys]?.cost ?? 0
|
||||
usage?.[feature.key as ProjectUsageResponseUsageKeys]?.cost ?? 0
|
||||
).toFixed(2)
|
||||
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IconLoader, IconAlertCircle } from 'ui'
|
||||
import { useParams } from 'hooks'
|
||||
import { ProjectUsage, NewProjectPanel } from 'components/interfaces/Home'
|
||||
import InformationBox from 'components/ui/InformationBox'
|
||||
import { ProjectUsagResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { ProjectUsageResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
|
||||
const ProjectUsageSection: FC = observer(({}) => {
|
||||
const { ref: projectRef } = useParams()
|
||||
@@ -24,7 +24,7 @@ const ProjectUsageSection: FC = observer(({}) => {
|
||||
|
||||
const hasProjectData = usage
|
||||
? Object.keys(usage)
|
||||
.map((key) => usage[key as ProjectUsagResponseUsageKeys].usage)
|
||||
.map((key) => usage[key as ProjectUsageResponseUsageKeys].usage)
|
||||
.some((usage) => (usage ?? 0) > 0)
|
||||
: false
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import SparkBar from 'components/ui/SparkBar'
|
||||
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
|
||||
import InformationBox from 'components/ui/InformationBox'
|
||||
import { USAGE_BASED_PRODUCTS } from 'components/interfaces/Billing/Billing.constants'
|
||||
import { ProjectUsagResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { ProjectUsageResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { useRouter } from 'next/router'
|
||||
import * as Tooltip from '@radix-ui/react-tooltip'
|
||||
|
||||
@@ -89,7 +89,7 @@ const ProjectUsage: FC<Props> = ({ projectRef }) => {
|
||||
showUsageExceedMessage &&
|
||||
product.features
|
||||
.map((feature) => {
|
||||
const featureUsage = usage[feature.key as ProjectUsagResponseUsageKeys]
|
||||
const featureUsage = usage[feature.key as ProjectUsageResponseUsageKeys]
|
||||
return (featureUsage.usage ?? 0) / featureUsage.limit > 1
|
||||
})
|
||||
.some((x) => x === true)
|
||||
@@ -136,7 +136,7 @@ const ProjectUsage: FC<Props> = ({ projectRef }) => {
|
||||
) : (
|
||||
<tbody>
|
||||
{product.features.map((feature) => {
|
||||
const featureUsage = usage[feature.key as ProjectUsagResponseUsageKeys]
|
||||
const featureUsage = usage[feature.key as ProjectUsageResponseUsageKeys]
|
||||
const usageValue = featureUsage.usage || 0
|
||||
const usageRatio = usageValue / featureUsage.limit
|
||||
const isApproaching = usageRatio >= USAGE_APPROACHING_THRESHOLD
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { FC } from 'react'
|
||||
import { Loading } from 'ui'
|
||||
|
||||
import { ProjectUsagResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { ProjectUsageResponseUsageKeys, useProjectUsageQuery } from 'data/usage/project-usage-query'
|
||||
import { useProjectSubscriptionQuery } from 'data/subscriptions/project-subscription-query'
|
||||
import { formatBytes } from 'lib/helpers'
|
||||
import { PRICING_TIER_PRODUCT_IDS, USAGE_APPROACHING_THRESHOLD } from 'lib/constants'
|
||||
@@ -24,7 +24,7 @@ const ProjectUsageMinimal: FC<ProjectUsageMinimalProps> = ({ projectRef, filter
|
||||
if (
|
||||
subscription?.tier?.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.PAYG ||
|
||||
subscription?.tier.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.ENTERPRISE ||
|
||||
subscription?.tier.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.TEAM
|
||||
subscription?.tier.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.TEAM
|
||||
) {
|
||||
return <></>
|
||||
}
|
||||
@@ -41,7 +41,7 @@ const ProjectUsageMinimal: FC<ProjectUsageMinimalProps> = ({ projectRef, filter
|
||||
{usage && (
|
||||
<div className="space-y-8">
|
||||
{product.features.map((feature) => {
|
||||
const featureUsage = usage[feature.key as ProjectUsagResponseUsageKeys]
|
||||
const featureUsage = usage[feature.key as ProjectUsageResponseUsageKeys]
|
||||
const usageRatio = (featureUsage.usage ?? 0) / featureUsage.limit
|
||||
const isApproaching = usageRatio >= USAGE_APPROACHING_THRESHOLD
|
||||
const isExceeded = usageRatio >= 1
|
||||
|
||||
@@ -54,7 +54,7 @@ export type ProjectUsageResponse = {
|
||||
disk_volume_size_gb: number
|
||||
}
|
||||
|
||||
export type ProjectUsagResponseUsageKeys = keyof Omit<ProjectUsageResponse, 'disk_volume_size_gb'>
|
||||
export type ProjectUsageResponseUsageKeys = keyof Omit<ProjectUsageResponse, 'disk_volume_size_gb'>
|
||||
|
||||
export async function getProjectUsage({ projectRef }: ProjectUsageVariables, signal?: AbortSignal) {
|
||||
if (!projectRef) {
|
||||
|
||||
Reference in new issue
Block a user