Skip to content

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

Add sentry alerts for critical points of failures (#27029)

Joshen Lim3a9e99f30edc
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.constants.ts b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.constants.ts
index c4be80a973e..a2e528f84d1 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.constants.ts
+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectCreation.constants.ts
@@ -1,3 +1,7 @@
+import { components } from 'api-types'
+
+type DesiredInstanceSize = components['schemas']['DesiredInstanceSize']
+
// [Joshen] Obtained from https://gist.github.com/tadast/8827699
export const COUNTRY_LAT_LON = {
AF: { lat: 33, lon: 65 },
@@ -252,3 +256,82 @@ export const COUNTRY_LAT_LON = {
ZM: { lat: -15, lon: 30 },
ZW: { lat: -20, lon: 30 },
}
+
+export const INSTANCE_SIZE_SPECS: Record<
+ DesiredInstanceSize,
+ { label: string; ram: string; cpu: string; price: string }
+> = {
+ micro: {
+ label: 'Micro',
+ ram: '1 GB',
+ cpu: '2-core ARM',
+ price: '$0.01344/hour (~$10/month)',
+ },
+ small: {
+ label: 'Small',
+ ram: '2 GB',
+ cpu: '2-core ARM',
+ price: '$0.0206/hour (~$15/month)',
+ },
+ medium: {
+ label: 'Medium',
+ ram: '4 GB',
+ cpu: '2-core ARM',
+ price: '$0.0822/hour (~$60/month)',
+ },
+ large: {
+ label: 'Large',
+ ram: '8 GB',
+ cpu: '2-core ARM',
+ price: '$0.1517/hour (~$110/month)',
+ },
+ xlarge: {
+ label: 'XL',
+ ram: '16 GB',
+ cpu: '4-core ARM',
+ price: '$0.2877/hour (~$210/month)',
+ },
+ '2xlarge': {
+ label: '2XL',
+ ram: '32 GB',
+ cpu: '8-core ARM',
+ price: '$0.562/hour (~$410/month)',
+ },
+ '4xlarge': {
+ label: '4XL',
+ ram: '64 GB',
+ cpu: '16-core ARM',
+ price: '$1.32/hour (~$960/month)',
+ },
+ '8xlarge': {
+ label: '8XL',
+ ram: '128 GB',
+ cpu: '32-core ARM',
+ price: '$2.562/hour (~$1,870/month)',
+ },
+ '12xlarge': {
+ label: '12XL',
+ ram: '192 GB',
+ cpu: '48-core ARM',
+ price: '$3.836/hour (~$2,800/month)',
+ },
+ '16xlarge': {
+ label: '16XL',
+ ram: '256 GB',
+ cpu: '64-core ARM',
+ price: '$5.12/hour (~$3,730/month)',
+ },
+}
+
+export const AVAILABLE_SIZES: DesiredInstanceSize[] = [
+ 'micro',
+ 'small',
+ 'medium',
+ 'large',
+ 'xlarge',
+ '2xlarge',
+ '4xlarge',
+ '8xlarge',
+ '12xlarge',
+ '16xlarge',
+]
diff --git a/apps/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx b/apps/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
index 0c5630b9007..ecf748732f8 100644
--- a/apps/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
@@ -1,4 +1,5 @@
import HCaptcha from '@hcaptcha/react-hcaptcha'
+import * as Sentry from '@sentry/nextjs'
import { useRouter } from 'next/router'
import { useRef, useState } from 'react'
import toast from 'react-hot-toast'
@@ -28,6 +29,7 @@ const ForgotPasswordForm = () => {
setCaptchaToken(null)
captchaRef.current?.resetCaptcha()
toast.error(`Failed to send reset email: ${error.message}`)
+ Sentry.captureMessage('[CRITICAL] Failed to send reset password email: ' + error.message)
},
})
diff --git a/apps/studio/components/interfaces/SignIn/ResetPasswordForm.tsx b/apps/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
index 82312ae3cf6..b02724dd9ee 100644
--- a/apps/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
@@ -1,3 +1,4 @@
+import * as Sentry from '@sentry/nextjs'
import { useRouter } from 'next/router'
import toast from 'react-hot-toast'
@@ -19,7 +20,8 @@ const ResetPasswordForm = () => {
await auth.signOut({ scope: 'others' })
await router.push('/projects')
} else {
- toast.error(error.message, { id: toastId })
+ toast.error(`Failed to save password: ${error.message}`, { id: toastId })
+ Sentry.captureMessage('[CRITICAL] Failed to reset password: ' + error.message)
}
}
diff --git a/apps/studio/components/interfaces/SignIn/SignInForm.tsx b/apps/studio/components/interfaces/SignIn/SignInForm.tsx
index f0d5bf56358..4b518cd24bc 100644
--- a/apps/studio/components/interfaces/SignIn/SignInForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInForm.tsx
@@ -1,4 +1,5 @@
import HCaptcha from '@hcaptcha/react-hcaptcha'
+import * as Sentry from '@sentry/nextjs'
import type { AuthError } from '@supabase/supabase-js'
import { useQueryClient } from '@tanstack/react-query'
import Link from 'next/link'
@@ -55,8 +56,9 @@ const SignInForm = () => {
const returnTo = getReturnToPath()
// since we're already on the /sign-in page, prevent redirect loops
router.push(returnTo === '/sign-in' ? '/projects' : returnTo)
- } catch (error) {
- toast.error((error as AuthError).message, { id: toastId })
+ } catch (error: any) {
+ toast.error(`Failed to sign in: ${(error as AuthError).message}`, { id: toastId })
+ Sentry.captureMessage('[CRITICAL] Failed to sign in via EP: ' + error.message)
}
} else {
setCaptchaToken(null)
diff --git a/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx b/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
index a448b237b83..837a8204d1f 100644
--- a/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
@@ -6,6 +6,7 @@ import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import toast from 'react-hot-toast'
import { object, string } from 'yup'
+import * as Sentry from '@sentry/nextjs'
import { useTelemetryProps } from 'common'
import AlertError from 'components/ui/AlertError'
@@ -22,9 +23,11 @@ const signInSchema = object({
})
const SignInMfaForm = () => {
- const queryClient = useQueryClient()
const router = useRouter()
+ const signOut = useSignOut()
+ const queryClient = useQueryClient()
const telemetryProps = useTelemetryProps()
+ const [selectedFactor, setSelectedFactor] = useState<Factor | null>(null)
const {
data: factors,
@@ -34,26 +37,12 @@ const SignInMfaForm = () => {
isLoading: isLoadingFactors,
} = useMfaListFactorsQuery()
const { mutate: mfaChallengeAndVerify, isLoading, isSuccess } = useMfaChallengeAndVerifyMutation()
- const [selectedFactor, setSelectedFactor] = useState<Factor | null>(null)
- const signOut = useSignOut()
const onClickLogout = async () => {
await signOut()
await router.replace('/sign-in')
}
- useEffect(() => {
- if (isSuccessFactors) {
- // if the user wanders into this page and he has no MFA setup, send the user to the next screen
- if (factors.totp.length === 0) {
- queryClient.resetQueries().then(() => router.push(getReturnToPath()))
- }
- if (factors.totp.length > 0) {
- setSelectedFactor(factors.totp[0])
- }
- }
- }, [factors?.totp, isSuccessFactors, router, queryClient])
-
const onSignIn = async ({ code }: { code: string }) => {
const toastId = toast.loading('Signing in...')
if (selectedFactor) {
@@ -71,13 +60,26 @@ const SignInMfaForm = () => {
router.push(getReturnToPath())
},
onError: (error) => {
- toast.error((error as AuthError).message, { id: toastId })
+ toast.error(`Failed to sign in: ${(error as AuthError).message}`, { id: toastId })
+ Sentry.captureMessage('[CRITICAL] Failed to sign in via MFA: ' + error.message)
},
}
)
}
}
+ useEffect(() => {
+ if (isSuccessFactors) {
+ // if the user wanders into this page and he has no MFA setup, send the user to the next screen
+ if (factors.totp.length === 0) {
+ queryClient.resetQueries().then(() => router.push(getReturnToPath()))
+ }
+ if (factors.totp.length > 0) {
+ setSelectedFactor(factors.totp[0])
+ }
+ }
+ }, [factors?.totp, isSuccessFactors, router, queryClient])
+
return (
<>
{isLoadingFactors && <GenericSkeletonLoader />}
diff --git a/apps/studio/components/interfaces/SignIn/SignInSSOForm.tsx b/apps/studio/components/interfaces/SignIn/SignInSSOForm.tsx
index 6708879bf34..2df60abc2c6 100644
--- a/apps/studio/components/interfaces/SignIn/SignInSSOForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInSSOForm.tsx
@@ -1,4 +1,5 @@
import HCaptcha from '@hcaptcha/react-hcaptcha'
+import * as Sentry from '@sentry/nextjs'
import { useQueryClient } from '@tanstack/react-query'
import { useRef, useState } from 'react'
import toast from 'react-hot-toast'
@@ -8,16 +9,14 @@ import { BASE_PATH } from 'lib/constants'
import { auth, buildPathWithParams } from 'lib/gotrue'
import { Button, Form, Input } from 'ui'
-const signInSchema = object({
- email: string().email('Must be a valid email').required('Email is required'),
-})
-
const SignInSSOForm = () => {
const queryClient = useQueryClient()
-
- const [captchaToken, setCaptchaToken] = useState<string | null>(null)
const captchaRef = useRef<HCaptcha>(null)
+ const [captchaToken, setCaptchaToken] = useState<string | null>(null)
+ const signInSchema = object({
+ email: string().email('Must be a valid email').required('Email is required'),
+ })
const onSignIn = async ({ email }: { email: string }) => {
const toastId = toast.loading('Signing in...')
@@ -54,7 +53,8 @@ const SignInSSOForm = () => {
} else {
setCaptchaToken(null)
captchaRef.current?.resetCaptcha()
- toast.error(error.message, { id: toastId })
+ toast.error(`Failed to sign in: ${error.message}`, { id: toastId })
+ Sentry.captureMessage('[CRITICAL] Failed to sign in via SSO: ' + error.message)
}
}
diff --git a/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx b/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
index d81af961655..38345161688 100644
--- a/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
@@ -1,7 +1,11 @@
+import { Github } from 'lucide-react'
+import { useState } from 'react'
+import toast from 'react-hot-toast'
+import * as Sentry from '@sentry/nextjs'
+
import { BASE_PATH } from 'lib/constants'
import { auth, buildPathWithParams } from 'lib/gotrue'
-import { useState } from 'react'
-import { Button, IconGitHub } from 'ui'
+import { Button } from 'ui'
const SignInWithGitHub = () => {
const [loading, setLoading] = useState(false)
@@ -26,8 +30,9 @@ const SignInWithGitHub = () => {
},
})
if (error) throw error
- } catch (error) {
- console.error(error)
+ } catch (error: any) {
+ toast.error(`Failed to sign in via GitHub: ${error.message}`)
+ Sentry.captureMessage('[CRITICAL] Failed to sign in via GH: ' + error.message)
setLoading(false)
}
}
@@ -37,7 +42,7 @@ const SignInWithGitHub = () => {
block
onClick={handleGithubSignIn}
// set the width to 20 so that it matches the loading spinner and don't push the text when loading
- icon={<IconGitHub width={20} height={18} />}
+ icon={<Github width={20} height={18} />}
size="large"
type="default"
loading={loading}
diff --git a/apps/studio/components/interfaces/SignIn/SignInWithSSO.tsx b/apps/studio/components/interfaces/SignIn/SignInWithSSO.tsx
index da8c5a09ae8..1ff6f1f13ca 100644
--- a/apps/studio/components/interfaces/SignIn/SignInWithSSO.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInWithSSO.tsx
@@ -1,9 +1,10 @@
+import { Lock } from 'lucide-react'
import Link from 'next/link'
-import { Button, IconLock } from 'ui'
+import { Button } from 'ui'
const SignInWithSSO = ({ searchParams }: { searchParams?: string }) => {
return (
- <Button asChild block size="large" type="outline" icon={<IconLock width={18} height={18} />}>
+ <Button asChild block size="large" type="outline" icon={<Lock width={18} height={18} />}>
<Link
href={{
pathname: '/sign-in-sso',
diff --git a/apps/studio/components/interfaces/SignIn/SignUpForm.tsx b/apps/studio/components/interfaces/SignIn/SignUpForm.tsx
index 10856dd563a..53af5276d50 100644
--- a/apps/studio/components/interfaces/SignIn/SignUpForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignUpForm.tsx
@@ -1,12 +1,23 @@
import HCaptcha from '@hcaptcha/react-hcaptcha'
+import { CheckCircle } from 'lucide-react'
import { useRef, useState } from 'react'
import toast from 'react-hot-toast'
import * as yup from 'yup'
+import * as Sentry from '@sentry/nextjs'
import { useSignUpMutation } from 'data/misc/signup-mutation'
import { BASE_PATH } from 'lib/constants'
import { passwordSchema } from 'lib/schemas'
-import { Alert, Button, Form, IconEye, IconEyeOff, Input } from 'ui'
+import {
+ AlertDescription_Shadcn_,
+ AlertTitle_Shadcn_,
+ Alert_Shadcn_,
+ Button,
+ Form,
+ IconEye,
+ IconEyeOff,
+ Input,
+} from 'ui'
import PasswordConditionsHelper from './PasswordConditionsHelper'
const signUpSchema = passwordSchema.shape({
@@ -29,6 +40,7 @@ const SignUpForm = () => {
setCaptchaToken(null)
captchaRef.current?.resetCaptcha()
toast.error(`Failed to sign up: ${error.message}`)
+ Sentry.captureMessage('[CRITICAL] Failed to sign up: ' + error.message)
},
})
@@ -58,10 +70,14 @@ const SignUpForm = () => {
isSubmitted ? 'opacity-100' : 'opacity-0'
}`}
>
- <Alert className="w-full" withIcon variant="success" title="Check your email to confirm">
- You've successfully signed up. Please check your email to confirm your account before
- signing in to the Supabase dashboard. The confirmation link expires in 10 minutes.
- </Alert>
+ <Alert_Shadcn_ variant="default">
+ <CheckCircle />
+ <AlertTitle_Shadcn_>Check your email to confirm</AlertTitle_Shadcn_>
+ <AlertDescription_Shadcn_ className="text-xs">
+ You've successfully signed up. Please check your email to confirm your account before
+ signing in to the Supabase dashboard. The confirmation link expires in 10 minutes.
+ </AlertDescription_Shadcn_>
+ </Alert_Shadcn_>
</div>
<Form
validateOnBlur
diff --git a/apps/studio/data/projects/project-create-mutation.ts b/apps/studio/data/projects/project-create-mutation.ts
index 46beeb8921f..937eec659b2 100644
--- a/apps/studio/data/projects/project-create-mutation.ts
+++ b/apps/studio/data/projects/project-create-mutation.ts
@@ -1,3 +1,4 @@
+import * as Sentry from '@sentry/nextjs'
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
import { toast } from 'react-hot-toast'
@@ -83,6 +84,7 @@ export const useProjectCreateMutation = ({
} else {
onError(data, variables, context)
}
+ Sentry.captureMessage('[CRITICAL] Failed to create project: ' + data.message)
},
...options,
}
diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx
index 8e4ee8884e5..5389d65c83e 100644
--- a/apps/studio/pages/new/[slug].tsx
+++ b/apps/studio/pages/new/[slug].tsx
@@ -1,23 +1,26 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { useParams } from 'common'
import generator from 'generate-password-browser'
import { debounce } from 'lodash'
+import { ExternalLink, Users } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { PropsWithChildren, useEffect, useRef, useState } from 'react'
import toast from 'react-hot-toast'
-import { Badge, Button, IconExternalLink, IconUsers, Input, Listbox, Separator } from 'ui'
+import { useParams } from 'common'
import {
FreeProjectLimitWarning,
NotOrganizationOwnerWarning,
} from 'components/interfaces/Organization/NewProject'
+import {
+ AVAILABLE_SIZES,
+ INSTANCE_SIZE_SPECS,
+} from 'components/interfaces/ProjectCreation/ProjectCreation.constants'
import { RegionSelector } from 'components/interfaces/ProjectCreation/RegionSelector'
import { WizardLayoutWithoutAuth } from 'components/layouts/WizardLayout'
import DisabledWarningDueToIncident from 'components/ui/DisabledWarningDueToIncident'
import Panel from 'components/ui/Panel'
import PasswordStrengthBar from 'components/ui/PasswordStrengthBar'
-import type { components } from 'data/api'
import { useFreeProjectLimitCheckQuery } from 'data/organizations/free-project-limit-check-query'
import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import {
@@ -28,18 +31,14 @@ import {
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useCheckPermissions, useFlag, withAuth } from 'hooks'
import {
- AWS_REGIONS,
CloudProvider,
DEFAULT_MINIMUM_PASSWORD_STRENGTH,
DEFAULT_PROVIDER,
- FLY_REGIONS,
PROVIDERS,
- Region,
} from 'lib/constants'
-import { passwordStrength, pluckObjectFields } from 'lib/helpers'
+import { passwordStrength } from 'lib/helpers'
import type { NextPageWithLayout } from 'types'
-
-type DesiredInstanceSize = components['schemas']['DesiredInstanceSize']
+import { Badge, Button, Input, Listbox } from 'ui'
const Wizard: NextPageWithLayout = () => {
const router = useRouter()
@@ -105,33 +104,6 @@ const Wizard: NextPageWithLayout = () => {
debounce((value) => checkPasswordStrength(value), 300)
).current
- useEffect(() => {
- /*
- * Handle no org
- * redirect to new org route
- */
- if (isEmptyOrganizations) {
- router.push(`/new`)
- }
- }, [isEmptyOrganizations, router])
-
- useEffect(() => {
- /*
- * Redirect to first org if the slug doesn't match an org slug
- * this is mainly to capture the /new/new-project url, which is redirected from database.new
- */
- if (isInvalidSlug && (organizations?.length ?? 0) > 0) {
- router.push(`/new/${organizations?.[0].slug}`)
- }
- }, [isInvalidSlug, organizations])
-
- useEffect(() => {
- // User added a new payment method
- if (router.query.setup_intent && router.query.redirect_status) {
- toast.success('Successfully added new payment method')
- }
- }, [router.query.redirect_status, router.query.setup_intent])
-
function onProjectNameChange(e: any) {
e.target.value = e.target.value.replace(/\./g, '')
setProjectName(e.target.value)
@@ -205,98 +177,32 @@ const Wizard: NextPageWithLayout = () => {
delayedCheckPasswordStrength(password)
}
- // [Fran] Enforce APSE1 region on staging
- function getAvailableRegions(cloudProvider: CloudProvider): Region {
- if (cloudProvider === 'AWS') {
- return process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
- ? pluckObjectFields(AWS_REGIONS, ['SOUTHEAST_ASIA'])
- : AWS_REGIONS
- // to do - may need to pluck regions for staging for FLY also
- } else if (cloudProvider === 'FLY') {
- return FLY_REGIONS
+ useEffect(() => {
+ /*
+ * Handle no org
+ * redirect to new org route
+ */
+ if (isEmptyOrganizations) {
+ router.push(`/new`)
}
+ }, [isEmptyOrganizations, router])
- throw new Error('Invalid cloud provider')
- }
+ useEffect(() => {
+ /*
+ * Redirect to first org if the slug doesn't match an org slug
+ * this is mainly to capture the /new/new-project url, which is redirected from database.new
+ */
+ if (isInvalidSlug && (organizations?.length ?? 0) > 0) {
+ router.push(`/new/${organizations?.[0].slug}`)
+ }
+ }, [isInvalidSlug, organizations])
- const sizes: DesiredInstanceSize[] = [
- 'micro',
- 'small',
- 'medium',
- 'large',
- 'xlarge',
- '2xlarge',
- '4xlarge',
- '8xlarge',
- '12xlarge',
- '16xlarge',
- ]
-
- const instanceSizeSpecs: Record<
- DesiredInstanceSize,
- { label: string; ram: string; cpu: string; price: string }
- > = {
- micro: {
- label: 'Micro',
- ram: '1 GB',
- cpu: '2-core ARM',
- price: '$0.01344/hour (~$10/month)',
- },
- small: {
- label: 'Small',
- ram: '2 GB',
- cpu: '2-core ARM',
- price: '$0.0206/hour (~$15/month)',
- },
- medium: {
- label: 'Medium',
- ram: '4 GB',
- cpu: '2-core ARM',
- price: '$0.0822/hour (~$60/month)',
- },
- large: {
- label: 'Large',
- ram: '8 GB',
- cpu: '2-core ARM',
- price: '$0.1517/hour (~$110/month)',
- },
- xlarge: {
- label: 'XL',
- ram: '16 GB',
- cpu: '4-core ARM',
- price: '$0.2877/hour (~$210/month)',
- },
- '2xlarge': {
- label: '2XL',
- ram: '32 GB',
- cpu: '8-core ARM',
- price: '$0.562/hour (~$410/month)',
- },
- '4xlarge': {
- label: '4XL',
- ram: '64 GB',
- cpu: '16-core ARM',
- price: '$1.32/hour (~$960/month)',
- },
- '8xlarge': {
- label: '8XL',
- ram: '128 GB',
- cpu: '32-core ARM',
- price: '$2.562/hour (~$1,870/month)',
- },
- '12xlarge': {
- label: '12XL',
- ram: '192 GB',
- cpu: '48-core ARM',
- price: '$3.836/hour (~$2,800/month)',
- },
- '16xlarge': {
- label: '16XL',
- ram: '256 GB',
- cpu: '64-core ARM',
- price: '$5.12/hour (~$3,730/month)',
- },
- }
+ useEffect(() => {
+ // User added a new payment method
+ if (router.query.setup_intent && router.query.redirect_status) {
+ toast.success('Successfully added new payment method')
+ }
+ }, [router.query.redirect_status, router.query.setup_intent])
return (
<Panel
@@ -358,7 +264,7 @@ const Wizard: NextPageWithLayout = () => {
key={x.id}
label={x.name}
value={x.slug}
- addOnBefore={() => <IconUsers />}
+ addOnBefore={() => <Users size={18} />}
>
{x.name}
</Listbox.Option>
@@ -444,7 +350,7 @@ const Wizard: NextPageWithLayout = () => {
>
<div className="flex items-center space-x-2 opacity-75 hover:opacity-100 transition">
<p className="text-sm m-0">Compute Add-Ons</p>
- <IconExternalLink size={16} strokeWidth={1.5} />
+ <ExternalLink size={16} strokeWidth={1.5} />
</div>
</Link>
@@ -454,7 +360,7 @@ const Wizard: NextPageWithLayout = () => {
>
<div className="flex items-center space-x-2 opacity-75 hover:opacity-100 transition">
<p className="text-sm m-0">Compute Billing</p>
- <IconExternalLink size={16} strokeWidth={1.5} />
+ <ExternalLink size={16} strokeWidth={1.5} />
</div>
</Link>
</div>
@@ -476,11 +382,11 @@ const Wizard: NextPageWithLayout = () => {
</>
}
>
- {sizes.map((option) => {
+ {AVAILABLE_SIZES.map((option) => {
return (
<Listbox.Option
key={option}
- label={`${instanceSizeSpecs[option].ram} RAM / ${instanceSizeSpecs[option].cpu} CPU (${instanceSizeSpecs[option].label})`}
+ label={`${INSTANCE_SIZE_SPECS[option].ram} RAM / ${INSTANCE_SIZE_SPECS[option].cpu} CPU (${INSTANCE_SIZE_SPECS[option].label})`}
value={option}
>
<div className="flex space-x-2">
@@ -489,16 +395,16 @@ const Wizard: NextPageWithLayout = () => {
variant={option === 'micro' ? 'default' : 'brand'}
className="rounded-md w-16 text-center flex justify-center font-mono uppercase"
>
- {instanceSizeSpecs[option].label}
+ {INSTANCE_SIZE_SPECS[option].label}
</Badge>
</div>
<div className="text-sm">
<span className="text-foreground">
- {instanceSizeSpecs[option].ram} RAM /{' '}
- {instanceSizeSpecs[option].cpu} CPU
+ {INSTANCE_SIZE_SPECS[option].ram} RAM /{' '}
+ {INSTANCE_SIZE_SPECS[option].cpu} CPU
</span>
<p className="text-xs text-muted">
- {instanceSizeSpecs[option].price}
+ {INSTANCE_SIZE_SPECS[option].price}
</p>
</div>
</div>
diff --git a/apps/studio/pages/reset-password.tsx b/apps/studio/pages/reset-password.tsx
index d8dbf7bcd8f..0b853754bf2 100644
--- a/apps/studio/pages/reset-password.tsx
+++ b/apps/studio/pages/reset-password.tsx
@@ -1,7 +1,8 @@
+import Link from 'next/link'
+
import ResetPasswordForm from 'components/interfaces/SignIn/ResetPasswordForm'
import { ForgotPasswordLayout } from 'components/layouts'
import { withAuth } from 'hooks'
-import Link from 'next/link'
import type { NextPageWithLayout } from 'types'
const ResetPasswordPage: NextPageWithLayout = () => {
diff --git a/apps/studio/pages/sign-in.tsx b/apps/studio/pages/sign-in.tsx
index e9d03e1caea..46a3e85a26f 100644
--- a/apps/studio/pages/sign-in.tsx
+++ b/apps/studio/pages/sign-in.tsx
@@ -1,12 +1,12 @@
import Link from 'next/link'
+import { useRouter } from 'next/router'
+import { useEffect } from 'react'
import SignInForm from 'components/interfaces/SignIn/SignInForm'
import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'
import SignInWithSSO from 'components/interfaces/SignIn/SignInWithSSO'
import { SignInLayout } from 'components/layouts'
import { IS_PLATFORM } from 'lib/constants'
-import { useRouter } from 'next/router'
-import { useEffect } from 'react'
import type { NextPageWithLayout } from 'types'
const SignInPage: NextPageWithLayout = () => {