Update docs url to env var (#38772)

* Update Supabase docs URLs to use env variable

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for documentation links

This change centralizes documentation links using a new DOCS_URL constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for all documentation links

This change replaces hardcoded documentation URLs with a centralized constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* replace more instances

* ci: Autofix updates from GitHub workflow

* remaining instances

* fix duplicate useRouter

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: alaister <10985857+alaister@users.noreply.github.com>
This commit is contained in:
Alaister Young
2025-09-26 18:16:33 +08:00
committed by GitHub
parent 2e9b6d63ed
commit 5f533247e1
182 changed files with 744 additions and 686 deletions

View File

@@ -11,6 +11,7 @@ import { tableRowKeys } from 'data/table-rows/keys'
import { useTableRowUpdateMutation } from 'data/table-rows/table-row-update-mutation' import { useTableRowUpdateMutation } from 'data/table-rows/table-row-update-mutation'
import type { TableRowsData } from 'data/table-rows/table-rows-query' import type { TableRowsData } from 'data/table-rows/table-rows-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { useGetImpersonatedRoleState } from 'state/role-impersonation-state' import { useGetImpersonatedRoleState } from 'state/role-impersonation-state'
import { useTableEditorTableStateSnapshot } from 'state/table-editor-table' import { useTableEditorTableStateSnapshot } from 'state/table-editor-table'
import { Dictionary } from 'types' import { Dictionary } from 'types'
@@ -115,7 +116,7 @@ export function useOnRowsChange(rows: SupaRow[]) {
each row before updating or deleting the row. each row before updating or deleting the row.
</p> </p>
<div className="mt-3"> <div className="mt-3">
<DocsButton href="https://supabase.com/docs/guides/database/tables#primary-keys" /> <DocsButton href={`${DOCS_URL}/guides/database/tables#primary-keys`} />
</div> </div>
</div> </div>
), ),

View File

@@ -17,6 +17,7 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { RoleImpersonationState } from 'lib/role-impersonation' import { RoleImpersonationState } from 'lib/role-impersonation'
import { import {
useRoleImpersonationStateSnapshot, useRoleImpersonationStateSnapshot,
@@ -47,7 +48,7 @@ export const MAX_EXPORT_ROW_COUNT_MESSAGE = (
<> <>
Sorry! We're unable to support exporting row counts larger than $ Sorry! We're unable to support exporting row counts larger than $
{MAX_EXPORT_ROW_COUNT.toLocaleString()} at the moment. Alternatively, you may consider using {MAX_EXPORT_ROW_COUNT.toLocaleString()} at the moment. Alternatively, you may consider using
<Link href="https://supabase.com/docs/reference/cli/supabase-db-dump" target="_blank"> <Link href={`${DOCS_URL}/reference/cli/supabase-db-dump`} target="_blank">
pg_dump pg_dump
</Link>{' '} </Link>{' '}
via our CLI instead. via our CLI instead.

View File

@@ -1,7 +1,7 @@
import Image from 'next/image' import Image from 'next/image'
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
export const Branching2Preview = () => { export const Branching2Preview = () => {
return ( return (
@@ -16,7 +16,7 @@ export const Branching2Preview = () => {
<p className="text-sm text-foreground-light mb-4"> <p className="text-sm text-foreground-light mb-4">
Create branches, review changes, and merge back into production all through the dashboard. Create branches, review changes, and merge back into production all through the dashboard.
Read the below limitations and our{' '} Read the below limitations and our{' '}
<InlineLink href="https://supabase.com/docs/guides/platform/branching"> <InlineLink href={`${DOCS_URL}/guides/platform/branching`}>
branching documentation branching documentation
</InlineLink>{' '} </InlineLink>{' '}
before opting in. before opting in.

View File

@@ -3,7 +3,7 @@ import Image from 'next/image'
import { useParams } from 'common' import { useParams } from 'common'
import { Markdown } from 'components/interfaces/Markdown' import { Markdown } from 'components/interfaces/Markdown'
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, WarningIcon } from 'ui' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, WarningIcon } from 'ui'
export const CLSPreview = () => { export const CLSPreview = () => {
@@ -14,11 +14,11 @@ export const CLSPreview = () => {
<div className="mb-4 flex flex-col gap-y-2"> <div className="mb-4 flex flex-col gap-y-2">
<Markdown <Markdown
className="text-foreground-light max-w-full" className="text-foreground-light max-w-full"
content={`[Postgres Column-Level Privileges](https://supabase.com/docs/guides/auth/column-level-security) is a feature of Postgres that allows you to grant or revoke privileges on tables and columns based on user roles.`} content={`[Postgres Column-Level Privileges](${DOCS_URL}/guides/auth/column-level-security) is a feature of Postgres that allows you to grant or revoke privileges on tables and columns based on user roles.`}
/> />
<Markdown <Markdown
className="text-foreground-light max-w-full" className="text-foreground-light max-w-full"
content={`This is an advanced feature and should be used with caution. Unless you have a very specific use case, we recommend just using [Row-Level Security](https://supabase.com/docs/guides/auth/row-level-security).`} content={`This is an advanced feature and should be used with caution. Unless you have a very specific use case, we recommend just using [Row-Level Security](${DOCS_URL}/guides/auth/row-level-security).`}
/> />
<Alert_Shadcn_ variant="warning" className="mt-2"> <Alert_Shadcn_ variant="warning" className="mt-2">
<WarningIcon /> <WarningIcon />

View File

@@ -2,6 +2,7 @@ import { ExternalLink } from 'lucide-react'
import Link from 'next/link' import Link from 'next/link'
import { useParams } from 'common' import { useParams } from 'common'
import { DOCS_URL } from 'lib/constants'
import { import {
Alert_Shadcn_, Alert_Shadcn_,
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
@@ -31,7 +32,7 @@ export const AuthAlert = ({
below. Developers using this provider should move over to the new provider. Please refer below. Developers using this provider should move over to the new provider. Please refer
to our{' '} to our{' '}
<a <a
href="https://supabase.com/docs/guides/auth/social-login/auth-slack" href={`${DOCS_URL}/guides/auth/social-login/auth-slack`}
className="underline" className="underline"
target="_blank" target="_blank"
> >

View File

@@ -10,6 +10,7 @@ import {
import { ResourceList } from 'components/ui/Resource/ResourceList' import { ResourceList } from 'components/ui/Resource/ResourceList'
import { HorizontalShimmerWithIcon } from 'components/ui/Shimmers/Shimmers' import { HorizontalShimmerWithIcon } from 'components/ui/Shimmers/Shimmers'
import { useAuthConfigQuery } from 'data/auth/auth-config-query' import { useAuthConfigQuery } from 'data/auth/auth-config-query'
import { DOCS_URL } from 'lib/constants'
import { import {
Alert_Shadcn_, Alert_Shadcn_,
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
@@ -53,7 +54,7 @@ export const AuthProvidersForm = () => {
to more than an hour. It is recommended to set this value to less than an hour. to more than an hour. It is recommended to set this value to less than an hour.
</p> </p>
<Button asChild type="default" className="w-min" icon={<ExternalLink />}> <Button asChild type="default" className="w-min" icon={<ExternalLink />}>
<Link href="https://supabase.com/docs/guides/platform/going-into-prod#security"> <Link href={`${DOCS_URL}/guides/platform/going-into-prod#security`}>
View security recommendations View security recommendations
</Link> </Link>
</Button> </Button>

View File

@@ -1,5 +1,6 @@
import { NO_REQUIRED_CHARACTERS, urlRegex } from 'components/interfaces/Auth/Auth.constants' import { NO_REQUIRED_CHARACTERS, urlRegex } from 'components/interfaces/Auth/Auth.constants'
import { ProjectAuthConfigData } from 'data/auth/auth-config-query' import { ProjectAuthConfigData } from 'data/auth/auth-config-query'
import { DOCS_URL } from 'lib/constants'
import { boolean, number, object, string } from 'yup' import { boolean, number, object, string } from 'yup'
const parseBase64URL = (b64url: string) => { const parseBase64URL = (b64url: string) => {
@@ -12,7 +13,7 @@ const PROVIDER_EMAIL = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Email', title: 'Email',
link: 'https://supabase.com/docs/guides/auth/passwords', link: `${DOCS_URL}/guides/auth/passwords`,
properties: { properties: {
EXTERNAL_EMAIL_ENABLED: { EXTERNAL_EMAIL_ENABLED: {
title: 'Enable Email provider', title: 'Enable Email provider',
@@ -95,7 +96,7 @@ const PROVIDER_EMAIL = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -217,7 +218,7 @@ export const PROVIDER_PHONE = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Phone', title: 'Phone',
link: 'https://supabase.com/docs/guides/auth/phone-login', link: `${DOCS_URL}/guides/auth/phone-login`,
properties: { properties: {
EXTERNAL_PHONE_ENABLED: { EXTERNAL_PHONE_ENABLED: {
title: 'Enable Phone provider', title: 'Enable Phone provider',
@@ -418,7 +419,7 @@ export const PROVIDER_PHONE = {
misc: { misc: {
iconKey: 'phone-icon4', iconKey: 'phone-icon4',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -426,7 +427,7 @@ const EXTERNAL_PROVIDER_APPLE = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Apple', title: 'Apple',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-apple', link: `${DOCS_URL}/guides/auth/social-login/auth-apple`,
properties: { properties: {
EXTERNAL_APPLE_ENABLED: { EXTERNAL_APPLE_ENABLED: {
title: 'Enable Sign in with Apple', title: 'Enable Sign in with Apple',
@@ -441,7 +442,7 @@ const EXTERNAL_PROVIDER_APPLE = {
}, },
EXTERNAL_APPLE_SECRET: { EXTERNAL_APPLE_SECRET: {
title: 'Secret Key (for OAuth)', title: 'Secret Key (for OAuth)',
description: `Secret key used in the OAuth flow. [Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#generate-a-client_secret)`, description: `Secret key used in the OAuth flow. [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#generate-a-client_secret)`,
type: 'string', type: 'string',
isSecret: true, isSecret: true,
}, },
@@ -527,7 +528,7 @@ const EXTERNAL_PROVIDER_APPLE = {
iconKey: 'apple-icon', iconKey: 'apple-icon',
requiresRedirect: true, requiresRedirect: true,
helper: `Register this callback URL when using Sign in with Apple on the web in the Apple Developer Center. helper: `Register this callback URL when using Sign in with Apple on the web in the Apple Developer Center.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
alert: { alert: {
title: `Apple OAuth secret keys expire every 6 months`, title: `Apple OAuth secret keys expire every 6 months`,
description: `A new secret should be generated every 6 months, otherwise users on the web will not be able to sign in.`, description: `A new secret should be generated every 6 months, otherwise users on the web will not be able to sign in.`,
@@ -539,7 +540,7 @@ const EXTERNAL_PROVIDER_AZURE = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Azure', title: 'Azure',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-azure', link: `${DOCS_URL}/guides/auth/social-login/auth-azure`,
properties: { properties: {
EXTERNAL_AZURE_ENABLED: { EXTERNAL_AZURE_ENABLED: {
title: 'Azure enabled', title: 'Azure enabled',
@@ -553,7 +554,7 @@ const EXTERNAL_PROVIDER_AZURE = {
EXTERNAL_AZURE_SECRET: { EXTERNAL_AZURE_SECRET: {
// [TODO] Change docs // [TODO] Change docs
title: 'Secret Value', title: 'Secret Value',
description: `Enter the data from Value, not the Secret ID. [Learn more](https://supabase.com/docs/guides/auth/social-login/auth-azure#obtain-a-secret-id)`, description: `Enter the data from Value, not the Secret ID. [Learn more](${DOCS_URL}/guides/auth/social-login/auth-azure#obtain-a-secret-id)`,
type: 'string', type: 'string',
isSecret: true, isSecret: true,
}, },
@@ -588,7 +589,7 @@ const EXTERNAL_PROVIDER_BITBUCKET = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Bitbucket', title: 'Bitbucket',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-bitbucket', link: `${DOCS_URL}/guides/auth/social-login/auth-bitbucket`,
properties: { properties: {
EXTERNAL_BITBUCKET_ENABLED: { EXTERNAL_BITBUCKET_ENABLED: {
title: 'Bitbucket enabled', title: 'Bitbucket enabled',
@@ -627,7 +628,7 @@ const EXTERNAL_PROVIDER_DISCORD = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Discord', title: 'Discord',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-discord?', link: `${DOCS_URL}/guides/auth/social-login/auth-discord?`,
properties: { properties: {
EXTERNAL_DISCORD_ENABLED: { EXTERNAL_DISCORD_ENABLED: {
title: 'Discord enabled', title: 'Discord enabled',
@@ -666,7 +667,7 @@ const EXTERNAL_PROVIDER_FACEBOOK = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Facebook', title: 'Facebook',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-facebook', link: `${DOCS_URL}/guides/auth/social-login/auth-facebook`,
properties: { properties: {
EXTERNAL_FACEBOOK_ENABLED: { EXTERNAL_FACEBOOK_ENABLED: {
title: 'Facebook enabled', title: 'Facebook enabled',
@@ -705,7 +706,7 @@ const EXTERNAL_PROVIDER_FIGMA = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Figma', title: 'Figma',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-figma', link: `${DOCS_URL}/guides/auth/social-login/auth-figma`,
properties: { properties: {
EXTERNAL_FIGMA_ENABLED: { EXTERNAL_FIGMA_ENABLED: {
title: 'Figma enabled', title: 'Figma enabled',
@@ -744,7 +745,7 @@ const EXTERNAL_PROVIDER_GITHUB = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'GitHub', title: 'GitHub',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-github', link: `${DOCS_URL}/guides/auth/social-login/auth-github`,
properties: { properties: {
EXTERNAL_GITHUB_ENABLED: { EXTERNAL_GITHUB_ENABLED: {
title: 'GitHub enabled', title: 'GitHub enabled',
@@ -783,7 +784,7 @@ const EXTERNAL_PROVIDER_GITLAB = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'GitLab', title: 'GitLab',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-gitlab', link: `${DOCS_URL}/guides/auth/social-login/auth-gitlab`,
properties: { properties: {
EXTERNAL_GITLAB_ENABLED: { EXTERNAL_GITLAB_ENABLED: {
title: 'GitLab enabled', title: 'GitLab enabled',
@@ -830,7 +831,7 @@ const EXTERNAL_PROVIDER_GOOGLE = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Google', title: 'Google',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-google', link: `${DOCS_URL}/guides/auth/social-login/auth-google`,
properties: { properties: {
EXTERNAL_GOOGLE_ENABLED: { EXTERNAL_GOOGLE_ENABLED: {
title: 'Enable Sign in with Google', title: 'Enable Sign in with Google',
@@ -884,7 +885,7 @@ const EXTERNAL_PROVIDER_GOOGLE = {
iconKey: 'google-icon', iconKey: 'google-icon',
requiresRedirect: true, requiresRedirect: true,
helper: `Register this callback URL when using Sign-in with Google on the web using OAuth. helper: `Register this callback URL when using Sign-in with Google on the web using OAuth.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-google#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-google#configure-your-services-id)`,
}, },
} }
@@ -892,7 +893,7 @@ const EXTERNAL_PROVIDER_KAKAO = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Kakao', title: 'Kakao',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-kakao', link: `${DOCS_URL}/guides/auth/social-login/auth-kakao`,
properties: { properties: {
EXTERNAL_KAKAO_ENABLED: { EXTERNAL_KAKAO_ENABLED: {
title: 'Kakao enabled', title: 'Kakao enabled',
@@ -934,7 +935,7 @@ const EXTERNAL_PROVIDER_KEYCLOAK = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'KeyCloak', title: 'KeyCloak',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-keycloak', link: `${DOCS_URL}/guides/auth/social-login/auth-keycloak`,
properties: { properties: {
EXTERNAL_KEYCLOAK_ENABLED: { EXTERNAL_KEYCLOAK_ENABLED: {
title: 'Keycloak enabled', title: 'Keycloak enabled',
@@ -985,7 +986,7 @@ const EXTERNAL_PROVIDER_LINKEDIN_OIDC = {
type: 'object', type: 'object',
key: 'linkedin_oidc', key: 'linkedin_oidc',
title: 'LinkedIn (OIDC)', title: 'LinkedIn (OIDC)',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-linkedin', link: `${DOCS_URL}/guides/auth/social-login/auth-linkedin`,
properties: { properties: {
EXTERNAL_LINKEDIN_OIDC_ENABLED: { EXTERNAL_LINKEDIN_OIDC_ENABLED: {
title: 'LinkedIn enabled', title: 'LinkedIn enabled',
@@ -1024,7 +1025,7 @@ const EXTERNAL_PROVIDER_NOTION = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Notion', title: 'Notion',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-notion', link: `${DOCS_URL}/guides/auth/social-login/auth-notion`,
properties: { properties: {
EXTERNAL_NOTION_ENABLED: { EXTERNAL_NOTION_ENABLED: {
title: 'Notion enabled', title: 'Notion enabled',
@@ -1063,7 +1064,7 @@ const EXTERNAL_PROVIDER_TWITCH = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Twitch', title: 'Twitch',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-twitch', link: `${DOCS_URL}/guides/auth/social-login/auth-twitch`,
properties: { properties: {
EXTERNAL_TWITCH_ENABLED: { EXTERNAL_TWITCH_ENABLED: {
title: 'Twitch enabled', title: 'Twitch enabled',
@@ -1102,7 +1103,7 @@ const EXTERNAL_PROVIDER_TWITTER = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Twitter', title: 'Twitter',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-twitter', link: `${DOCS_URL}/guides/auth/social-login/auth-twitter`,
properties: { properties: {
EXTERNAL_TWITTER_ENABLED: { EXTERNAL_TWITTER_ENABLED: {
title: 'Twitter enabled', title: 'Twitter enabled',
@@ -1141,7 +1142,7 @@ const EXTERNAL_PROVIDER_SLACK = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Slack (Deprecated)', title: 'Slack (Deprecated)',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-slack', link: `${DOCS_URL}/guides/auth/social-login/auth-slack`,
properties: { properties: {
EXTERNAL_SLACK_ENABLED: { EXTERNAL_SLACK_ENABLED: {
title: 'Slack enabled', title: 'Slack enabled',
@@ -1181,7 +1182,7 @@ const EXTERNAL_PROVIDER_SLACK_OIDC = {
type: 'object', type: 'object',
title: 'Slack (OIDC)', title: 'Slack (OIDC)',
key: 'slack_oidc', key: 'slack_oidc',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-slack', link: `${DOCS_URL}/guides/auth/social-login/auth-slack`,
properties: { properties: {
EXTERNAL_SLACK_OIDC_ENABLED: { EXTERNAL_SLACK_OIDC_ENABLED: {
title: 'Slack enabled', title: 'Slack enabled',
@@ -1220,7 +1221,7 @@ const EXTERNAL_PROVIDER_SPOTIFY = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Spotify', title: 'Spotify',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-spotify', link: `${DOCS_URL}/guides/auth/social-login/auth-spotify`,
properties: { properties: {
EXTERNAL_SPOTIFY_ENABLED: { EXTERNAL_SPOTIFY_ENABLED: {
title: 'Spotify enabled', title: 'Spotify enabled',
@@ -1259,7 +1260,7 @@ const EXTERNAL_PROVIDER_WORKOS = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'WorkOS', title: 'WorkOS',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-workos', link: `${DOCS_URL}/guides/auth/social-login/auth-workos`,
properties: { properties: {
EXTERNAL_WORKOS_ENABLED: { EXTERNAL_WORKOS_ENABLED: {
title: 'WorkOS enabled', title: 'WorkOS enabled',
@@ -1309,7 +1310,7 @@ const EXTERNAL_PROVIDER_ZOOM = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Zoom', title: 'Zoom',
link: 'https://supabase.com/docs/guides/auth/social-login/auth-zoom', link: `${DOCS_URL}/guides/auth/social-login/auth-zoom`,
properties: { properties: {
EXTERNAL_ZOOM_ENABLED: { EXTERNAL_ZOOM_ENABLED: {
title: 'Zoom enabled', title: 'Zoom enabled',
@@ -1348,12 +1349,11 @@ const PROVIDER_SAML = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'SAML 2.0', title: 'SAML 2.0',
link: 'https://supabase.com/docs/guides/auth/enterprise-sso/auth-sso-saml', link: `${DOCS_URL}/guides/auth/enterprise-sso/auth-sso-saml`,
properties: { properties: {
SAML_ENABLED: { SAML_ENABLED: {
title: 'Enable SAML 2.0 Single Sign-on', title: 'Enable SAML 2.0 Single Sign-on',
description: description: `You will need to use the [Supabase CLI](${DOCS_URL}/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to set up SAML after enabling it`,
'You will need to use the [Supabase CLI](https://supabase.com/docs/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to set up SAML after enabling it',
type: 'boolean', type: 'boolean',
}, },
SAML_EXTERNAL_URL: { SAML_EXTERNAL_URL: {
@@ -1385,7 +1385,7 @@ const PROVIDER_WEB3 = {
$schema: JSON_SCHEMA_VERSION, $schema: JSON_SCHEMA_VERSION,
type: 'object', type: 'object',
title: 'Web3 Wallet', title: 'Web3 Wallet',
link: 'https://supabase.com/docs/guides/auth/auth-web3', link: `${DOCS_URL}/guides/auth/auth-web3`,
properties: { properties: {
EXTERNAL_WEB3_ETHEREUM_ENABLED: { EXTERNAL_WEB3_ETHEREUM_ENABLED: {
title: 'Enable Sign in with Ethereum', title: 'Enable Sign in with Ethereum',

View File

@@ -1,6 +1,8 @@
import type { FormSchema } from 'types'
import { object, string } from 'yup' import { object, string } from 'yup'
import { DOCS_URL } from 'lib/constants'
import type { FormSchema } from 'types'
const JSON_SCHEMA_VERSION = 'http://json-schema.org/draft-07/schema#' const JSON_SCHEMA_VERSION = 'http://json-schema.org/draft-07/schema#'
const CONFIRMATION: FormSchema = { const CONFIRMATION: FormSchema = {
@@ -34,7 +36,7 @@ const CONFIRMATION: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -69,7 +71,7 @@ const INVITE: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -104,7 +106,7 @@ const MAGIC_LINK: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -140,7 +142,7 @@ const EMAIL_CHANGE: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
@@ -175,7 +177,7 @@ const RECOVERY: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }
const REAUTHENTICATION: FormSchema = { const REAUTHENTICATION: FormSchema = {
@@ -206,7 +208,7 @@ const REAUTHENTICATION: FormSchema = {
misc: { misc: {
iconKey: 'email-icon2', iconKey: 'email-icon2',
helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console. helper: `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
[Learn more](https://supabase.com/docs/guides/auth/social-login/auth-apple#configure-your-services-id)`, [Learn more](${DOCS_URL}/guides/auth/social-login/auth-apple#configure-your-services-id)`,
}, },
} }

View File

@@ -15,6 +15,7 @@ import { useAuthConfigQuery } from 'data/auth/auth-config-query'
import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation' import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -186,7 +187,7 @@ export const BasicAuthSettingsForm = () => {
Enable{' '} Enable{' '}
<InlineLink <InlineLink
className="text-foreground-light hover:text-foreground" className="text-foreground-light hover:text-foreground"
href="https://supabase.com/docs/guides/auth/auth-identity-linking#manual-linking-beta" href={`${DOCS_URL}/guides/auth/auth-identity-linking#manual-linking-beta`}
> >
manual linking APIs manual linking APIs
</InlineLink>{' '} </InlineLink>{' '}
@@ -219,7 +220,7 @@ export const BasicAuthSettingsForm = () => {
Enable{' '} Enable{' '}
<InlineLink <InlineLink
className="text-foreground-light hover:text-foreground" className="text-foreground-light hover:text-foreground"
href="https://supabase.com/docs/guides/auth/auth-anonymous" href={`${DOCS_URL}/guides/auth/auth-anonymous`}
> >
anonymous sign-ins anonymous sign-ins
</InlineLink>{' '} </InlineLink>{' '}
@@ -263,7 +264,7 @@ export const BasicAuthSettingsForm = () => {
to ensure that access to your data is restricted where required. to ensure that access to your data is restricted where required.
</p> </p>
<Button asChild type="default" className="w-min" icon={<ExternalLink />}> <Button asChild type="default" className="w-min" icon={<ExternalLink />}>
<Link href="https://supabase.com/docs/guides/auth/auth-anonymous#access-control"> <Link href={`${DOCS_URL}/guides/auth/auth-anonymous#access-control`}>
View access control docs View access control docs
</Link> </Link>
</Button> </Button>

View File

@@ -2,6 +2,7 @@ import Link from 'next/link'
import { useParams } from 'common' import { useParams } from 'common'
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -20,7 +21,7 @@ export function EmailRateLimitsAlert() {
<AlertDescription_Shadcn_> <AlertDescription_Shadcn_>
You're using the built-in email service. The service has rate limits and it's not meant to You're using the built-in email service. The service has rate limits and it's not meant to
be used for production apps. Check the{' '} be used for production apps. Check the{' '}
<InlineLink href="https://supabase.com/docs/guides/platform/going-into-prod#auth-rate-limits"> <InlineLink href={`${DOCS_URL}/guides/platform/going-into-prod#auth-rate-limits`}>
documentation documentation
</InlineLink>{' '} </InlineLink>{' '}
for an up-to-date information on the current rate limits. for an up-to-date information on the current rate limits.

View File

@@ -17,6 +17,7 @@ import { AuthConfigResponse } from 'data/auth/auth-config-query'
import { useAuthHooksUpdateMutation } from 'data/auth/auth-hooks-update-mutation' import { useAuthHooksUpdateMutation } from 'data/auth/auth-hooks-update-mutation'
import { executeSql } from 'data/sql/execute-sql-query' import { executeSql } from 'data/sql/execute-sql-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
FormControl_Shadcn_, FormControl_Shadcn_,
@@ -290,7 +291,7 @@ export const CreateHookSheet = ({
{isCreating ? `Add ${title}` : `Update ${title}`} {isCreating ? `Add ${title}` : `Update ${title}`}
</SheetTitle> </SheetTitle>
</div> </div>
<DocsButton href={'https://supabase.com/docs/guides/auth/auth-hooks/' + hook.docSlug} /> <DocsButton href={`${DOCS_URL}/guides/auth/auth-hooks/${hook.docSlug}`} />
</SheetHeader> </SheetHeader>
<Separator /> <Separator />
<SheetSection className="overflow-auto flex-grow px-0"> <SheetSection className="overflow-auto flex-grow px-0">

View File

@@ -4,6 +4,7 @@ import { Check, Webhook } from 'lucide-react'
import { ButtonTooltip } from 'components/ui/ButtonTooltip' import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { Badge, Input, copyToClipboard } from 'ui' import { Badge, Input, copyToClipboard } from 'ui'
import { Hook } from './hooks.constants' import { Hook } from './hooks.constants'
@@ -108,7 +109,7 @@ export const HookCard = ({ hook, onSelect }: HookCardProps) => {
> >
Configure hook Configure hook
</ButtonTooltip> </ButtonTooltip>
<DocsButton href={'https://supabase.com/docs/guides/auth/auth-hooks/' + hook.docSlug} /> <DocsButton href={`${DOCS_URL}/guides/auth/auth-hooks/${hook.docSlug}`} />
</div> </div>
</div> </div>
<div className="flex-1"> <div className="flex-1">

View File

@@ -2,6 +2,7 @@ import { noop } from 'lodash'
import { ChevronLeft, FlaskConical } from 'lucide-react' import { ChevronLeft, FlaskConical } from 'lucide-react'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
import { POLICY_MODAL_VIEWS } from '../Policies.constants' import { POLICY_MODAL_VIEWS } from '../Policies.constants'
@@ -59,10 +60,7 @@ const PolicyEditorModalTitle = ({
Try Supabase Assistant Try Supabase Assistant
</Button> </Button>
)} )}
<DocsButton <DocsButton className="mt-[-4px]" href={`${DOCS_URL}/learn/auth-deep-dive/auth-policies`} />
className="mt-[-4px]"
href="https://supabase.com/docs/learn/auth-deep-dive/auth-policies"
/>
</div> </div>
</div> </div>
) )

View File

@@ -13,6 +13,7 @@ import NoPermission from 'components/ui/NoPermission'
import { useAuthConfigQuery } from 'data/auth/auth-config-query' import { useAuthConfigQuery } from 'data/auth/auth-config-query'
import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation' import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -214,9 +215,9 @@ export const ProtectionAuthSettingsForm = () => {
<InlineLink <InlineLink
href={ href={
field.value === 'hcaptcha' field.value === 'hcaptcha'
? 'https://supabase.com/docs/guides/auth/auth-captcha?queryGroups=captcha-method&captcha-method=hcaptcha-1' ? `${DOCS_URL}/guides/auth/auth-captcha?queryGroups=captcha-method&captcha-method=hcaptcha-1`
: field.value === 'turnstile' : field.value === 'turnstile'
? 'https://supabase.com/docs/guides/auth/auth-captcha?queryGroups=captcha-method&captcha-method=turnstile-1' ? `${DOCS_URL}/guides/auth/auth-captcha?queryGroups=captcha-method&captcha-method=turnstile-1`
: '/' : '/'
} }
className="mt-2 text-xs text-foreground-light hover:text-foreground no-underline" className="mt-2 text-xs text-foreground-light hover:text-foreground no-underline"

View File

@@ -11,6 +11,7 @@ import { DocsButton } from 'components/ui/DocsButton'
import { HorizontalShimmerWithIcon } from 'components/ui/Shimmers/Shimmers' import { HorizontalShimmerWithIcon } from 'components/ui/Shimmers/Shimmers'
import { useAuthConfigQuery } from 'data/auth/auth-config-query' import { useAuthConfigQuery } from 'data/auth/auth-config-query'
import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation' import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -82,7 +83,7 @@ export const RedirectUrls = () => {
allowed, for example, https://*.domain.com allowed, for example, https://*.domain.com
</ScaffoldDescription> </ScaffoldDescription>
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/auth/concepts/redirect-urls" /> <DocsButton href={`${DOCS_URL}/guides/auth/concepts/redirect-urls`} />
</div> </div>
{isLoading && ( {isLoading && (

View File

@@ -1,8 +1,8 @@
import { Check } from 'lucide-react' import { Check } from 'lucide-react'
import Image from 'next/image' import Image from 'next/image'
import { useParams } from 'common'
import { ThirdPartyAuthIntegration } from 'data/third-party-auth/integrations-query' import { ThirdPartyAuthIntegration } from 'data/third-party-auth/integrations-query'
import { DOCS_URL } from 'lib/constants'
import { Badge, Button } from 'ui' import { Badge, Button } from 'ui'
import { AWS_IDP_REGIONS } from './AwsRegionSelector' import { AWS_IDP_REGIONS } from './AwsRegionSelector'
import { import {
@@ -29,7 +29,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
users. You can read more in the{' '} users. You can read more in the{' '}
<a <a
className="hover:decoration-brand underline hover:text-foreground transition" className="hover:decoration-brand underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/auth" href={`${DOCS_URL}/guides/auth`}
> >
documentation documentation
</a> </a>
@@ -44,7 +44,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
read more in the{' '} read more in the{' '}
<a <a
className="hover:decoration-brand underline hover:text-foreground transition" className="hover:decoration-brand underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/auth" href={`${DOCS_URL}/guides/auth`}
> >
documentation documentation
</a> </a>
@@ -58,7 +58,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
can read more in the{' '} can read more in the{' '}
<a <a
className="hover:decoration-brand underline hover:text-foreground transition" className="hover:decoration-brand underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/auth/third-party/aws-cognito" href={`${DOCS_URL}/guides/auth/third-party/aws-cognito`}
> >
documentation documentation
</a> </a>
@@ -73,7 +73,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
more in the{' '} more in the{' '}
<a <a
className="hover:decoration-brand underline hover:text-foreground transition" className="hover:decoration-brand underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/auth/third-party/clerk" href={`${DOCS_URL}/guides/auth/third-party/clerk`}
> >
documentation documentation
</a> </a>
@@ -88,7 +88,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => {
more in the{' '} more in the{' '}
<a <a
className="hover:decoration-brand underline hover:text-foreground transition" className="hover:decoration-brand underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/auth/third-party/workos" href={`${DOCS_URL}/guides/auth/third-party/workos`}
> >
documentation documentation
</a> </a>

View File

@@ -18,6 +18,7 @@ import {
useThirdPartyAuthIntegrationsQuery, useThirdPartyAuthIntegrationsQuery,
} from 'data/third-party-auth/integrations-query' } from 'data/third-party-auth/integrations-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { cn } from 'ui' import { cn } from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { AddIntegrationDropdown } from './AddIntegrationDropdown' import { AddIntegrationDropdown } from './AddIntegrationDropdown'
@@ -73,14 +74,16 @@ export const ThirdPartyAuthForm = () => {
<br /> <br />
Billing is based on the number of monthly active users (MAUs) requesting your API Billing is based on the number of monthly active users (MAUs) requesting your API
throughout the billing period. Refer to our{' '} throughout the billing period. Refer to our{' '}
<InlineLink href="https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users-third-party"> <InlineLink
href={`${DOCS_URL}/guides/platform/manage-your-usage/monthly-active-users-third-party`}
>
billing docs billing docs
</InlineLink>{' '} </InlineLink>{' '}
for more information. for more information.
</ScaffoldSectionDescription> </ScaffoldSectionDescription>
</div> </div>
<div className="flex items-center gap-2 "> <div className="flex items-center gap-2 ">
<DocsButton href="https://supabase.com/docs/guides/auth/third-party/overview" /> <DocsButton href={`${DOCS_URL}/guides/auth/third-party/overview`} />
{integrations.length !== 0 && ( {integrations.length !== 0 && (
<AddIntegrationDropdown onSelectIntegrationType={setSelectedIntegration} /> <AddIntegrationDropdown onSelectIntegrationType={setSelectedIntegration} />
)} )}

View File

@@ -1,4 +1,5 @@
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { Button, Modal, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui' import { Button, Modal, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui'
interface SpendCapModalProps { interface SpendCapModalProps {
@@ -15,7 +16,7 @@ const SpendCapModal = ({ visible, onHide }: SpendCapModalProps) => {
header={ header={
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<span>Spend Cap</span> <span>Spend Cap</span>
<DocsButton href="https://supabase.com/docs/guides/platform/cost-control#spend-cap" /> <DocsButton href={`${DOCS_URL}/guides/platform/cost-control#spend-cap`} />
</div> </div>
} }
showCloseButton={false} showCloseButton={false}

View File

@@ -1,6 +1,8 @@
import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { AlertCircle } from 'lucide-react' import { AlertCircle } from 'lucide-react'
import Link from 'next/link' import Link from 'next/link'
import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { DOCS_URL } from 'lib/constants'
import { AlertDescription_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { AlertDescription_Shadcn_, Alert_Shadcn_, Button } from 'ui'
interface CPUWarningsProps { interface CPUWarningsProps {
@@ -22,9 +24,7 @@ const CPUWarnings = ({ isFreePlan, upgradeUrl, severity }: CPUWarningsProps) =>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
<div className="mt-3 flex items-center space-x-2"> <div className="mt-3 flex items-center space-x-2">
<Button asChild type="default"> <Button asChild type="default">
<Link href="https://supabase.com/docs/guides/troubleshooting/high-cpu-usage"> <Link href={`${DOCS_URL}/guides/troubleshooting/high-cpu-usage`}>Learn more</Link>
Learn more
</Link>
</Button> </Button>
<Button asChild type="warning"> <Button asChild type="warning">
<Link href={upgradeUrl}> <Link href={upgradeUrl}>
@@ -48,9 +48,7 @@ const CPUWarnings = ({ isFreePlan, upgradeUrl, severity }: CPUWarningsProps) =>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
<div className="mt-3 flex items-center space-x-2"> <div className="mt-3 flex items-center space-x-2">
<Button asChild type="default"> <Button asChild type="default">
<Link href="https://supabase.com/docs/guides/troubleshooting/high-cpu-usage"> <Link href={`${DOCS_URL}/guides/troubleshooting/high-cpu-usage`}>Learn more</Link>
Learn more
</Link>
</Button> </Button>
<Button asChild type="danger"> <Button asChild type="danger">
<Link href={upgradeUrl}> <Link href={upgradeUrl}>

View File

@@ -1,6 +1,8 @@
import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { AlertCircle } from 'lucide-react' import { AlertCircle } from 'lucide-react'
import Link from 'next/link' import Link from 'next/link'
import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { DOCS_URL } from 'lib/constants'
import { AlertDescription_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { AlertDescription_Shadcn_, Alert_Shadcn_, Button } from 'ui'
interface RAMWarningsProps { interface RAMWarningsProps {
@@ -22,9 +24,7 @@ const RAMWarnings = ({ isFreePlan, upgradeUrl, severity }: RAMWarningsProps) =>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
<div className="mt-3 flex items-center space-x-2"> <div className="mt-3 flex items-center space-x-2">
<Button asChild type="default"> <Button asChild type="default">
<Link href="https://supabase.com/docs/guides/troubleshooting/exhaust-ram"> <Link href={`${DOCS_URL}/guides/troubleshooting/exhaust-ram`}>Learn more</Link>
Learn more
</Link>
</Button> </Button>
<Button asChild type="warning"> <Button asChild type="warning">
<Link href={upgradeUrl}> <Link href={upgradeUrl}>
@@ -48,9 +48,7 @@ const RAMWarnings = ({ isFreePlan, upgradeUrl, severity }: RAMWarningsProps) =>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
<div className="mt-3 flex items-center space-x-2"> <div className="mt-3 flex items-center space-x-2">
<Button asChild type="default"> <Button asChild type="default">
<Link href="https://supabase.com/docs/guides/troubleshooting/high-cpu-usage"> <Link href={`${DOCS_URL}/guides/troubleshooting/high-cpu-usage`}>Learn more</Link>
Learn more
</Link>
</Button> </Button>
<Button asChild type="danger"> <Button asChild type="danger">
<Link href={upgradeUrl}> <Link href={upgradeUrl}>

View File

@@ -4,6 +4,7 @@ import Link from 'next/link'
import { BranchSelector } from './BranchSelector' import { BranchSelector } from './BranchSelector'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
const EMPTY_STATE_CONTAINER = 'flex items-center flex-col justify-center w-full py-10 px-4' const EMPTY_STATE_CONTAINER = 'flex items-center flex-col justify-center w-full py-10 px-4'
@@ -69,7 +70,7 @@ export const PreviewBranchesEmptyState = ({
your database schema without affecting your main database. your database schema without affecting your main database.
</p> </p>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<DocsButton href="https://supabase.com/docs/guides/platform/branching" /> <DocsButton href={`${DOCS_URL}/guides/platform/branching`} />
<Button type="primary" onClick={() => onSelectCreateBranch()}> <Button type="primary" onClick={() => onSelectCreateBranch()}>
Create your first branch Create your first branch
</Button> </Button>

View File

@@ -1,3 +1,4 @@
import { DOCS_URL } from 'lib/constants'
import { CodeBlockLang } from 'ui' import { CodeBlockLang } from 'ui'
export type DatabaseConnectionType = export type DatabaseConnectionType =
@@ -75,7 +76,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'nextjs', key: 'nextjs',
label: 'Next.js', label: 'Next.js',
icon: 'nextjs', icon: 'nextjs',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/nextjs', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nextjs`,
children: [ children: [
{ {
key: 'app', key: 'app',
@@ -109,8 +110,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'remix', key: 'remix',
label: 'Remix', label: 'Remix',
icon: 'remix', icon: 'remix',
guideLink: guideLink: `${DOCS_URL}/guides/auth/server-side/creating-a-client?framework=remix&environment=remix-loader`,
'https://supabase.com/docs/guides/auth/server-side/creating-a-client?framework=remix&environment=remix-loader',
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -124,7 +124,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'react', key: 'react',
label: 'React', label: 'React',
icon: 'react', icon: 'react',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/reactjs', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/reactjs`,
children: [ children: [
{ {
key: 'create-react-app', key: 'create-react-app',
@@ -158,7 +158,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'nuxt', key: 'nuxt',
label: 'Nuxt', label: 'Nuxt',
icon: 'nuxt', icon: 'nuxt',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/nuxtjs', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nuxtjs`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -172,7 +172,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'vuejs', key: 'vuejs',
label: 'Vue.JS', label: 'Vue.JS',
icon: 'vuejs', icon: 'vuejs',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/vue', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/vue`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -187,7 +187,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'sveltekit', key: 'sveltekit',
label: 'SvelteKit', label: 'SvelteKit',
icon: 'sveltekit', icon: 'sveltekit',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/sveltekit', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/sveltekit`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -201,7 +201,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'solidjs', key: 'solidjs',
label: 'Solid.js', label: 'Solid.js',
icon: 'solidjs', icon: 'solidjs',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/solidjs', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/solidjs`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -229,7 +229,7 @@ export const FRAMEWORKS: ConnectionType[] = [
key: 'refine', key: 'refine',
label: 'refine', label: 'refine',
icon: 'refine', icon: 'refine',
guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/refine', guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/refine`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -246,7 +246,7 @@ export const MOBILES: ConnectionType[] = [
key: 'exporeactnative', key: 'exporeactnative',
label: 'Expo React Native', label: 'Expo React Native',
icon: 'expo', icon: 'expo',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-expo-react-native', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-expo-react-native`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -260,7 +260,7 @@ export const MOBILES: ConnectionType[] = [
key: 'flutter', key: 'flutter',
label: 'Flutter', label: 'Flutter',
icon: 'flutter', icon: 'flutter',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-flutter', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-flutter`,
children: [ children: [
{ {
key: 'supabaseflutter', key: 'supabaseflutter',
@@ -274,7 +274,7 @@ export const MOBILES: ConnectionType[] = [
key: 'ionicreact', key: 'ionicreact',
label: 'Ionic React', label: 'Ionic React',
icon: 'react', icon: 'react',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-ionic-react', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-ionic-react`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -288,7 +288,7 @@ export const MOBILES: ConnectionType[] = [
key: 'swift', key: 'swift',
label: 'Swift', label: 'Swift',
icon: 'swift', icon: 'swift',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-swift', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-swift`,
children: [ children: [
{ {
key: 'supabaseswift', key: 'supabaseswift',
@@ -302,7 +302,7 @@ export const MOBILES: ConnectionType[] = [
key: 'androidkotlin', key: 'androidkotlin',
label: 'Android Kotlin', label: 'Android Kotlin',
icon: 'kotlin', icon: 'kotlin',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-kotlin', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-kotlin`,
children: [ children: [
{ {
key: 'supabasekt', key: 'supabasekt',
@@ -316,7 +316,7 @@ export const MOBILES: ConnectionType[] = [
key: 'ionicangular', key: 'ionicangular',
label: 'Ionic Angular', label: 'Ionic Angular',
icon: 'ionic-angular', icon: 'ionic-angular',
guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-ionic-angular', guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-ionic-angular`,
children: [ children: [
{ {
key: 'supabasejs', key: 'supabasejs',
@@ -340,8 +340,7 @@ export const ORMS: ConnectionType[] = [
key: 'drizzle', key: 'drizzle',
label: 'Drizzle', label: 'Drizzle',
icon: 'drizzle', icon: 'drizzle',
guideLink: guideLink: `${DOCS_URL}/guides/database/connecting-to-postgres#connecting-with-drizzle`,
'https://supabase.com/docs/guides/database/connecting-to-postgres#connecting-with-drizzle',
children: [], children: [],
}, },
] ]

View File

@@ -7,6 +7,7 @@ import { InlineLink } from 'components/ui/InlineLink'
import { useBackupDownloadMutation } from 'data/database/backup-download-mutation' import { useBackupDownloadMutation } from 'data/database/backup-download-mutation'
import type { DatabaseBackup } from 'data/database/backups-query' import type { DatabaseBackup } from 'data/database/backups-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { Badge, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { Badge, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
import { TimestampInfo } from 'ui-patterns' import { TimestampInfo } from 'ui-patterns'
@@ -75,7 +76,9 @@ export const BackupItem = ({ index, isHealthy, backup, onSelectBackup }: BackupI
<> <>
Physical backups cannot be downloaded through the dashboard. You can still Physical backups cannot be downloaded through the dashboard. You can still
download it via pgdump by following our guide{' '} download it via pgdump by following our guide{' '}
<InlineLink href="https://supabase.com/docs/guides/troubleshooting/download-logical-backups"> <InlineLink
href={`${DOCS_URL}/guides/troubleshooting/download-logical-backups`}
>
here here
</InlineLink> </InlineLink>
. .

View File

@@ -10,6 +10,7 @@ import { useSchemasQuery } from 'data/database/schemas-query'
import { executeSql } from 'data/sql/execute-sql-query' import { executeSql } from 'data/sql/execute-sql-query'
import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { useProtectedSchemas } from 'hooks/useProtectedSchemas' import { useProtectedSchemas } from 'hooks/useProtectedSchemas'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -146,7 +147,7 @@ const EnableExtensionModal = ({ visible, extension, onCancel }: EnableExtensionM
{extension.name} cannot be accelerated by indexes on tables that are using the {extension.name} cannot be accelerated by indexes on tables that are using the
OrioleDB access method OrioleDB access method
</span> </span>
<DocsButton abbrev={false} className="mt-2" href="https://supabase.com/docs" /> <DocsButton abbrev={false} className="mt-2" href={`${DOCS_URL}`} />
</Admonition> </Admonition>
)} )}

View File

@@ -9,6 +9,7 @@ import { useDatabaseExtensionDisableMutation } from 'data/database-extensions/da
import { DatabaseExtension } from 'data/database-extensions/database-extensions-query' import { DatabaseExtension } from 'data/database-extensions/database-extensions-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { extensions } from 'shared-data' import { extensions } from 'shared-data'
import { Button, Switch, TableCell, TableRow, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { Button, Switch, TableCell, TableRow, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
import { Admonition } from 'ui-patterns' import { Admonition } from 'ui-patterns'
@@ -37,7 +38,7 @@ export const ExtensionRow = ({ extension }: ExtensionRowProps) => {
const extensionMeta = extensions.find((item) => item.name === extension.name) const extensionMeta = extensions.find((item) => item.name === extension.name)
const docsUrl = extensionMeta?.link.startsWith('/guides') const docsUrl = extensionMeta?.link.startsWith('/guides')
? `https://supabase.com/docs${extensionMeta?.link}` ? `${DOCS_URL}${extensionMeta?.link}`
: extensionMeta?.link ?? undefined : extensionMeta?.link ?? undefined
const { mutate: disableExtension, isLoading: isDisabling } = useDatabaseExtensionDisableMutation({ const { mutate: disableExtension, isLoading: isDisabling } = useDatabaseExtensionDisableMutation({

View File

@@ -11,6 +11,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query' import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
Card, Card,
Input, Input,
@@ -72,7 +73,7 @@ export const Extensions = () => {
className="w-52" className="w-52"
icon={<Search size={14} />} icon={<Search size={14} />}
/> />
<DocsButton href="https://supabase.com/docs/guides/database/extensions" /> <DocsButton href={`${DOCS_URL}/guides/database/extensions`} />
</div> </div>
</div> </div>

View File

@@ -12,6 +12,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useDatabaseHooksQuery } from 'data/database-triggers/database-triggers-query' import { useDatabaseHooksQuery } from 'data/database-triggers/database-triggers-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { noop } from 'lib/void' import { noop } from 'lib/void'
import { Input } from 'ui' import { Input } from 'ui'
import { HooksListEmpty } from './HooksListEmpty' import { HooksListEmpty } from './HooksListEmpty'
@@ -63,7 +64,7 @@ export const HooksList = ({
onChange={(e) => setFilterString(e.target.value)} onChange={(e) => setFilterString(e.target.value)}
/> />
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-2">
<DocsButton href="https://supabase.com/docs/guides/database/webhooks" /> <DocsButton href={`${DOCS_URL}/guides/database/webhooks`} />
<ButtonTooltip <ButtonTooltip
onClick={() => createHook()} onClick={() => createHook()}
disabled={!isPermissionsLoaded || !canCreateWebhooks} disabled={!isPermissionsLoaded || !canCreateWebhooks}

View File

@@ -11,6 +11,7 @@ import { useSchemasQuery } from 'data/database/schemas-query'
import { useTableColumnsQuery } from 'data/database/table-columns-query' import { useTableColumnsQuery } from 'data/database/table-columns-query'
import { useEntityTypesQuery } from 'data/entity-types/entity-types-infinite-query' import { useEntityTypesQuery } from 'data/entity-types/entity-types-infinite-query'
import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
CommandEmpty_Shadcn_, CommandEmpty_Shadcn_,
@@ -379,7 +380,7 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp
description="More index types may be supported when OrioleDB is no longer in preview" description="More index types may be supported when OrioleDB is no longer in preview"
> >
{/* [Joshen Oriole] Hook up proper docs URL */} {/* [Joshen Oriole] Hook up proper docs URL */}
<DocsButton className="mt-2" abbrev={false} href="https://supabase.com/docs" /> <DocsButton className="mt-2" abbrev={false} href={`${DOCS_URL}`} />
</Admonition> </Admonition>
)} )}
</SidePanel.Content> </SidePanel.Content>

View File

@@ -11,6 +11,7 @@ import { replicationKeys } from 'data/replication/keys'
import { fetchReplicationPipelineVersion } from 'data/replication/pipeline-version-query' import { fetchReplicationPipelineVersion } from 'data/replication/pipeline-version-query'
import { useReplicationPipelinesQuery } from 'data/replication/pipelines-query' import { useReplicationPipelinesQuery } from 'data/replication/pipelines-query'
import { useReplicationSourcesQuery } from 'data/replication/sources-query' import { useReplicationSourcesQuery } from 'data/replication/sources-query'
import { DOCS_URL } from 'lib/constants'
import { Button, cn, Input_Shadcn_ } from 'ui' import { Button, cn, Input_Shadcn_ } from 'ui'
import { GenericSkeletonLoader } from 'ui-patterns' import { GenericSkeletonLoader } from 'ui-patterns'
import { DestinationPanel } from './DestinationPanel' import { DestinationPanel } from './DestinationPanel'
@@ -136,7 +137,7 @@ export const Destinations = () => {
<div className="flex gap-x-2"> <div className="flex gap-x-2">
<EnableReplicationModal /> <EnableReplicationModal />
{/* [Joshen] Placeholder for when we have documentation */} {/* [Joshen] Placeholder for when we have documentation */}
<DocsButton href="https://supabase.com/docs" /> <DocsButton href={`${DOCS_URL}`} />
</div> </div>
</div> </div>
) : hasDestinations ? ( ) : hasDestinations ? (

View File

@@ -32,7 +32,7 @@ import {
useIsAwsK8sCloudProvider, useIsAwsK8sCloudProvider,
useSelectedProjectQuery, useSelectedProjectQuery,
} from 'hooks/misc/useSelectedProject' } from 'hooks/misc/useSelectedProject'
import { GB, PROJECT_STATUS } from 'lib/constants' import { DOCS_URL, GB, PROJECT_STATUS } from 'lib/constants'
import { CloudProvider } from 'shared-data' import { CloudProvider } from 'shared-data'
import { import {
Button, Button,
@@ -372,7 +372,7 @@ export function DiskManagementForm() {
<DocsButton <DocsButton
abbrev={false} abbrev={false}
className="mt-2" className="mt-2"
href="https://supabase.com/docs/guides/platform/database-size#read-only-mode" href={`${DOCS_URL}/guides/platform/database-size#read-only-mode`}
/> />
</Admonition> </Admonition>
)} )}
@@ -385,7 +385,7 @@ export function DiskManagementForm() {
<DocsButton <DocsButton
abbrev={false} abbrev={false}
className="mt-2" className="mt-2"
href="https://supabase.com/docs/guides/platform/database-size#disabling-read-only-mode" href={`${DOCS_URL}/guides/platform/database-size#disabling-read-only-mode`}
/> />
</Admonition> </Admonition>
)} )}

View File

@@ -2,6 +2,7 @@ import Link from 'next/link'
import { useParams } from 'common' import { useParams } from 'common'
import { FormHeader } from 'components/ui/Forms/FormHeader' import { FormHeader } from 'components/ui/Forms/FormHeader'
import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
import { NoticeBar } from './ui/NoticeBar' import { NoticeBar } from './ui/NoticeBar'
@@ -13,7 +14,7 @@ export function DiskManagementPanelForm() {
<div id="disk-management"> <div id="disk-management">
<FormHeader <FormHeader
title="Disk Management" title="Disk Management"
docsUrl="https://supabase.com/docs/guides/platform/database-size#disk-management" docsUrl={`${DOCS_URL}/guides/platform/database-size#disk-management`}
/> />
<NoticeBar <NoticeBar
visible={true} visible={true}

View File

@@ -6,10 +6,11 @@ import { useParams } from 'common'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query' import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { getCloudProviderArchitecture } from 'lib/cloudprovider-utils' import { getCloudProviderArchitecture } from 'lib/cloudprovider-utils'
import { InstanceSpecs } from 'lib/constants' import { DOCS_URL, InstanceSpecs } from 'lib/constants'
import Link from 'next/link' import Link from 'next/link'
import { import {
cn, cn,
@@ -33,7 +34,6 @@ import {
import { BillingChangeBadge } from '../ui/BillingChangeBadge' import { BillingChangeBadge } from '../ui/BillingChangeBadge'
import FormMessage from '../ui/FormMessage' import FormMessage from '../ui/FormMessage'
import { NoticeBar } from '../ui/NoticeBar' import { NoticeBar } from '../ui/NoticeBar'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
/** /**
* to do: this could be a type from api-types * to do: this could be a type from api-types
@@ -139,7 +139,7 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {
<div className="mt-3"> <div className="mt-3">
<DocsButton <DocsButton
abbrev={false} abbrev={false}
href="https://supabase.com/docs/guides/platform/compute-and-disk" href={`${DOCS_URL}/guides/platform/compute-and-disk`}
/> />
</div> </div>

View File

@@ -8,7 +8,7 @@ import { useDiskUtilizationQuery } from 'data/config/disk-utilization-query'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { GB } from 'lib/constants' import { DOCS_URL, GB } from 'lib/constants'
import { Button, FormControl_Shadcn_, FormField_Shadcn_, Input_Shadcn_, Skeleton, cn } from 'ui' import { Button, FormControl_Shadcn_, FormField_Shadcn_, Input_Shadcn_, Skeleton, cn } from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { DiskStorageSchemaType } from '../DiskManagement.schema' import { DiskStorageSchemaType } from '../DiskManagement.schema'
@@ -156,10 +156,7 @@ export function DiskSizeField({
`Your plan includes ${includedDiskGB} GB of disk size for ${watchedStorageType}.`} `Your plan includes ${includedDiskGB} GB of disk size for ${watchedStorageType}.`}
<div className="mt-3"> <div className="mt-3">
<DocsButton <DocsButton abbrev={false} href={`${DOCS_URL}/guides/platform/database-size`} />
abbrev={false}
href="https://supabase.com/docs/guides/platform/database-size"
/>
</div> </div>
</span> </span>
<DiskTypeRecommendationSection <DiskTypeRecommendationSection

View File

@@ -8,6 +8,7 @@ import CodeSnippet from 'components/interfaces/Docs/CodeSnippet'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-config-query' import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-config-query'
import { generateTypes } from 'data/projects/project-type-generation-query' import { generateTypes } from 'data/projects/project-type-generation-query'
import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
interface Props { interface Props {
@@ -43,7 +44,7 @@ export default function GeneratingTypes({ selectedLang }: Props) {
<> <>
<h2 className="doc-heading flex items-center justify-between"> <h2 className="doc-heading flex items-center justify-between">
<span>Generating types</span> <span>Generating types</span>
<DocsButton href="https://supabase.com/docs/guides/database/api/generating-types" /> <DocsButton href={`${DOCS_URL}/guides/database/api/generating-types`} />
</h2> </h2>
<div className="doc-section"> <div className="doc-section">
<article className="code-column text-foreground"> <article className="code-column text-foreground">
@@ -53,10 +54,8 @@ export default function GeneratingTypes({ selectedLang }: Props) {
</p> </p>
<p> <p>
You can generate types from your database either through the{' '} You can generate types from your database either through the{' '}
<Link href="https://supabase.com/docs/guides/database/api/generating-types"> <Link href={`${DOCS_URL}/guides/database/api/generating-types`}>Supabase CLI</Link>, or
Supabase CLI by downloading the types file via the button on the right and importing it in your
</Link>
, or by downloading the types file via the button on the right and importing it in your
application within <code>src/index.ts</code>. application within <code>src/index.ts</code>.
</p> </p>
</article> </article>

View File

@@ -4,6 +4,7 @@ import { useRouter } from 'next/router'
import { useParams } from 'common' import { useParams } from 'common'
import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
import { makeRandomString } from 'lib/helpers' import { makeRandomString } from 'lib/helpers'
import CodeSnippet from '../CodeSnippet' import CodeSnippet from '../CodeSnippet'
import Snippets from '../Snippets' import Snippets from '../Snippets'
@@ -179,11 +180,7 @@ export const UserManagement = ({ selectedLang, showApiKey }: UserManagementProps
</p> </p>
<p> <p>
View all the available{' '} View all the available{' '}
<a <a href={`${DOCS_URL}/guides/auth#providers`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/auth#providers"
target="_blank"
rel="noreferrer"
>
Third Party OAuth providers Third Party OAuth providers
</a> </a>
</p> </p>

View File

@@ -8,6 +8,7 @@ import Snippets from 'components/interfaces/Docs/Snippets'
import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query' import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query'
import { useProjectJsonSchemaQuery } from 'data/docs/project-json-schema-query' import { useProjectJsonSchemaQuery } from 'data/docs/project-json-schema-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
interface ResourceContentProps { interface ResourceContentProps {
apiEndpoint: string apiEndpoint: string
@@ -120,7 +121,7 @@ const ResourceContent = ({
</p> </p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/select" href={`${DOCS_URL}/reference/javascript/select`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -157,7 +158,7 @@ const ResourceContent = ({
<p>Supabase provides a wide range of filters.</p> <p>Supabase provides a wide range of filters.</p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/using-filters" href={`${DOCS_URL}/reference/javascript/using-filters`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -188,7 +189,7 @@ const ResourceContent = ({
</p> </p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/insert" href={`${DOCS_URL}/reference/javascript/insert`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -228,7 +229,7 @@ const ResourceContent = ({
</p> </p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/update" href={`${DOCS_URL}/reference/javascript/update`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -256,7 +257,7 @@ const ResourceContent = ({
</p> </p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/delete" href={`${DOCS_URL}/reference/javascript/delete`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -285,7 +286,7 @@ const ResourceContent = ({
</p> </p>
<p> <p>
<a <a
href="https://supabase.com/docs/reference/javascript/subscribe" href={`${DOCS_URL}/reference/javascript/subscribe`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -19,6 +19,7 @@ import { useEdgeFunctionQuery } from 'data/edge-functions/edge-function-query'
import { useEdgeFunctionDeleteMutation } from 'data/edge-functions/edge-functions-delete-mutation' import { useEdgeFunctionDeleteMutation } from 'data/edge-functions/edge-functions-delete-mutation'
import { useEdgeFunctionUpdateMutation } from 'data/edge-functions/edge-functions-update-mutation' import { useEdgeFunctionUpdateMutation } from 'data/edge-functions/edge-functions-update-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { import {
Alert_Shadcn_, Alert_Shadcn_,
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
@@ -378,7 +379,7 @@ export const EdgeFunctionDetails = () => {
icon={<ExternalLink strokeWidth={1.5} />} icon={<ExternalLink strokeWidth={1.5} />}
> >
<Link <Link
href="https://supabase.com/docs/guides/functions/dependencies" href={`${DOCS_URL}/guides/functions/dependencies`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -11,6 +11,7 @@ import { ResourceList } from 'components/ui/Resource/ResourceList'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state' import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { import {
AiIconAnimation, AiIconAnimation,
@@ -236,7 +237,9 @@ export const FunctionsEmptyStateLocal = () => {
value="supabase functions new hello-world" value="supabase functions new hello-world"
/> />
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/functions/local-quickstart#create-an-edge-function" /> <DocsButton
href={`${DOCS_URL}/guides/functions/local-quickstart#create-an-edge-function`}
/>
</div> </div>
<div className="p-8"> <div className="p-8">
@@ -259,7 +262,9 @@ supabase start # start the supabase stack
supabase functions serve # start the Functions watcher`.trim()} supabase functions serve # start the Functions watcher`.trim()}
/> />
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/functions/local-quickstart#running-edge-functions-locally" /> <DocsButton
href={`${DOCS_URL}/guides/functions/local-quickstart#running-edge-functions-locally`}
/>
</div> </div>
<div className="p-8"> <div className="p-8">
@@ -285,7 +290,9 @@ curl --request POST 'http://localhost:54321/functions/v1/hello-world' \\
--data '{ "name":"Functions" }'`.trim()} --data '{ "name":"Functions" }'`.trim()}
/> />
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/functions/local-quickstart#invoking-edge-functions-locally" /> <DocsButton
href={`${DOCS_URL}/guides/functions/local-quickstart#invoking-edge-functions-locally`}
/>
</div> </div>
</CardContent> </CardContent>
</Card> </Card>
@@ -306,7 +313,7 @@ curl --request POST 'http://localhost:54321/functions/v1/hello-world' \\
on providers like Fly.io, Digital Ocean, or AWS. on providers like Fly.io, Digital Ocean, or AWS.
</p> </p>
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-2">
<DocsButton href="https://supabase.com/docs/reference/self-hosting-functions/introduction" /> <DocsButton href={`${DOCS_URL}/reference/self-hosting-functions/introduction`} />
<Button asChild type="default" icon={<Github />}> <Button asChild type="default" icon={<Github />}>
<a href="https://github.com/supabase/edge-runtime/">GitHub</a> <a href="https://github.com/supabase/edge-runtime/">GitHub</a>
</Button> </Button>
@@ -383,7 +390,7 @@ export const FunctionsSecretsEmptyStateLocal = () => {
</li> </li>
</ul> </ul>
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/functions/secrets#using-the-cli" /> <DocsButton href={`${DOCS_URL}/guides/functions/secrets#using-the-cli`} />
</div> </div>
</CardContent> </CardContent>
</Card> </Card>

View File

@@ -9,6 +9,7 @@ import { useAccessTokensQuery } from 'data/access-tokens/access-tokens-query'
import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query' import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query'
import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query'
import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query' import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
CollapsibleContent_Shadcn_, CollapsibleContent_Shadcn_,
@@ -140,7 +141,7 @@ export const TerminalInstructions = forwardRef<
</p> </p>
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<DocsButton href="https://supabase.com/docs/guides/functions" /> <DocsButton href={`${DOCS_URL}/guides/functions`} />
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a <a
target="_blank" target="_blank"

View File

@@ -26,7 +26,7 @@ import {
useProjectByRefQuery, useProjectByRefQuery,
useSelectedProjectQuery, useSelectedProjectQuery,
} from 'hooks/misc/useSelectedProject' } from 'hooks/misc/useSelectedProject'
import { IS_PLATFORM, PROJECT_STATUS } from 'lib/constants' import { DOCS_URL, IS_PLATFORM, PROJECT_STATUS } from 'lib/constants'
import { useAppStateSnapshot } from 'state/app-state' import { useAppStateSnapshot } from 'state/app-state'
import { import {
Badge, Badge,
@@ -127,7 +127,7 @@ export const Home = () => {
<TooltipContent side="bottom" align="start" className="max-w-80 text-center"> <TooltipContent side="bottom" align="start" className="max-w-80 text-center">
This project is using Postgres with OrioleDB which is currently in preview and This project is using Postgres with OrioleDB which is currently in preview and
not suitable for production workloads. View our{' '} not suitable for production workloads. View our{' '}
<InlineLink href="https://supabase.com/docs/guides/database/orioledb"> <InlineLink href={`${DOCS_URL}/guides/database/orioledb`}>
documentation documentation
</InlineLink>{' '} </InlineLink>{' '}
for all limitations. for all limitations.

View File

@@ -6,6 +6,7 @@ import Panel from 'components/ui/Panel'
import { EditorIndexPageLink } from 'data/prefetchers/project.$ref.editor' import { EditorIndexPageLink } from 'data/prefetchers/project.$ref.editor'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { Auth, EdgeFunctions, Realtime, SqlEditor, Storage, TableEditor } from 'icons' import { Auth, EdgeFunctions, Realtime, SqlEditor, Storage, TableEditor } from 'icons'
import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
import { APIKeys } from './APIKeys' import { APIKeys } from './APIKeys'
import { GetStartedHero } from './GetStartedHero' import { GetStartedHero } from './GetStartedHero'
@@ -51,11 +52,7 @@ export const NewProjectPanel = () => {
<Link href={`/project/${ref}/sql/new`}>SQL Editor</Link> <Link href={`/project/${ref}/sql/new`}>SQL Editor</Link>
</Button> </Button>
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<Link <Link href={`${DOCS_URL}/guides/database`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/database"
target="_blank"
rel="noreferrer"
>
About Database About Database
</Link> </Link>
</Button> </Button>
@@ -100,11 +97,7 @@ export const NewProjectPanel = () => {
type="default" type="default"
asChild asChild
> >
<Link <Link href={`${DOCS_URL}/guides/auth`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/auth"
target="_blank"
rel="noreferrer"
>
About Auth About Auth
</Link> </Link>
</Button> </Button>
@@ -136,11 +129,7 @@ export const NewProjectPanel = () => {
type="default" type="default"
asChild asChild
> >
<Link <Link href={`${DOCS_URL}/guides/storage`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/storage"
target="_blank"
rel="noreferrer"
>
About Storage About Storage
</Link> </Link>
</Button> </Button>
@@ -173,7 +162,7 @@ export const NewProjectPanel = () => {
asChild asChild
> >
<Link <Link
href="https://supabase.com/docs/guides/functions" href={`${DOCS_URL}/guides/functions`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -206,11 +195,7 @@ export const NewProjectPanel = () => {
type="default" type="default"
asChild asChild
> >
<Link <Link href={`${DOCS_URL}/guides/realtime`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/realtime"
target="_blank"
rel="noreferrer"
>
About Realtime About Realtime
</Link> </Link>
</Button> </Button>
@@ -229,7 +214,7 @@ export const NewProjectPanel = () => {
<h2>Connecting to your new project</h2> <h2>Connecting to your new project</h2>
<p className="text-base text-foreground-light lg:max-w-sm"> <p className="text-base text-foreground-light lg:max-w-sm">
Interact with your database through the{' '} Interact with your database through the{' '}
<Link href="https://supabase.com/docs/reference" className="text-brand"> <Link href={`${DOCS_URL}/reference`} className="text-brand">
Supabase client libraries Supabase client libraries
</Link>{' '} </Link>{' '}
with your API keys. with your API keys.
@@ -244,11 +229,7 @@ export const NewProjectPanel = () => {
<Link href={`/project/${ref}/settings/api`}>View API settings</Link> <Link href={`/project/${ref}/settings/api`}>View API settings</Link>
</Button> </Button>
<Button asChild className="translate-y-[1px]" type="default" icon={<ExternalLink />}> <Button asChild className="translate-y-[1px]" type="default" icon={<ExternalLink />}>
<Link <Link href={`${DOCS_URL}/guides/database/api`} target="_blank" rel="noreferrer">
href="https://supabase.com/docs/guides/database/api"
target="_blank"
rel="noreferrer"
>
About APIs About APIs
</Link> </Link>
</Button> </Button>

View File

@@ -13,6 +13,7 @@ import {
} from 'data/service-status/service-status-query' } from 'data/service-status/service-status-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
InfoIcon, InfoIcon,
@@ -213,7 +214,7 @@ export const ServiceStatus = () => {
{ {
name: 'Edge Functions', name: 'Edge Functions',
error: undefined, error: undefined,
docsUrl: 'https://supabase.com/docs/guides/functions/troubleshooting', docsUrl: `${DOCS_URL}/guides/functions/troubleshooting`,
isLoading, isLoading,
isHealthy: !!edgeFunctionsStatus?.healthy, isHealthy: !!edgeFunctionsStatus?.healthy,
status: edgeFunctionsStatus?.healthy status: edgeFunctionsStatus?.healthy

View File

@@ -20,7 +20,7 @@ import { useTablesQuery } from 'data/tables/tables-query'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state' import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { import {
AiIconAnimation, AiIconAnimation,
@@ -167,7 +167,7 @@ export function GettingStartedSection({
actions: [ actions: [
{ {
label: 'Create schema file', label: 'Create schema file',
href: 'https://supabase.com/docs/guides/local-development/declarative-database-schemas', href: `${DOCS_URL}/guides/local-development/declarative-database-schemas`,
variant: 'default', variant: 'default',
}, },
{ {
@@ -192,7 +192,7 @@ export function GettingStartedSection({
actions: [ actions: [
{ {
label: 'Create a seed file', label: 'Create a seed file',
href: 'https://supabase.com/docs/guides/local-development/seeding-your-database', href: `${DOCS_URL}/guides/local-development/seeding-your-database`,
variant: 'default', variant: 'default',
}, },
{ {
@@ -262,7 +262,7 @@ export function GettingStartedSection({
actions: [ actions: [
{ {
label: 'Read docs', label: 'Read docs',
href: 'https://supabase.com/docs/guides/auth', href: `${DOCS_URL}/guides/auth`,
variant: 'default', variant: 'default',
}, },
], ],
@@ -426,7 +426,7 @@ export function GettingStartedSection({
actions: [ actions: [
{ {
label: 'Read docs', label: 'Read docs',
href: 'https://supabase.com/docs/guides/auth', href: `${DOCS_URL}/guides/auth`,
variant: 'default', variant: 'default',
}, },
], ],

View File

@@ -12,6 +12,7 @@ import {
} from 'data/service-status/service-status-query' } from 'data/service-status/service-status-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { InfoIcon, PopoverContent_Shadcn_, PopoverTrigger_Shadcn_, Popover_Shadcn_, cn } from 'ui' import { InfoIcon, PopoverContent_Shadcn_, PopoverTrigger_Shadcn_, Popover_Shadcn_, cn } from 'ui'
/** /**
@@ -200,7 +201,7 @@ export const ServiceStatus = () => {
{ {
name: 'Edge Functions', name: 'Edge Functions',
error: undefined, error: undefined,
docsUrl: 'https://supabase.com/docs/guides/functions/troubleshooting', docsUrl: `${DOCS_URL}/guides/functions/troubleshooting`,
isLoading, isLoading,
isHealthy: !!edgeFunctionsStatus?.healthy, isHealthy: !!edgeFunctionsStatus?.healthy,
status: edgeFunctionsStatus?.healthy status: edgeFunctionsStatus?.healthy

View File

@@ -5,6 +5,7 @@ import { ProjectPausedState } from 'components/layouts/ProjectLayout/PausedState
import { ComputeBadgeWrapper } from 'components/ui/ComputeBadgeWrapper' import { ComputeBadgeWrapper } from 'components/ui/ComputeBadgeWrapper'
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { ProjectUpgradeFailedBanner } from 'components/ui/ProjectUpgradeFailedBanner' import { ProjectUpgradeFailedBanner } from 'components/ui/ProjectUpgradeFailedBanner'
import { DOCS_URL } from 'lib/constants'
import { ReactFlowProvider } from 'reactflow' import { ReactFlowProvider } from 'reactflow'
import { Badge, cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { Badge, cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
import { InstanceConfiguration } from '../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration' import { InstanceConfiguration } from '../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration'
@@ -54,7 +55,7 @@ export const TopSection = ({
<TooltipContent side="bottom" align="start" className="max-w-80 text-center"> <TooltipContent side="bottom" align="start" className="max-w-80 text-center">
This project is using Postgres with OrioleDB which is currently in preview and This project is using Postgres with OrioleDB which is currently in preview and
not suitable for production workloads. View our{' '} not suitable for production workloads. View our{' '}
<InlineLink href="https://supabase.com/docs/guides/database/orioledb"> <InlineLink href={`${DOCS_URL}/guides/database/orioledb`}>
documentation documentation
</InlineLink>{' '} </InlineLink>{' '}
for all limitations. for all limitations.

View File

@@ -4,7 +4,7 @@ import Image from 'next/image'
import { ComponentType, ReactNode } from 'react' import { ComponentType, ReactNode } from 'react'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { cn } from 'ui' import { cn } from 'ui'
import { UpgradeDatabaseAlert } from '../Queues/UpgradeDatabaseAlert' import { UpgradeDatabaseAlert } from '../Queues/UpgradeDatabaseAlert'
import { WRAPPERS } from '../Wrappers/Wrappers.constants' import { WRAPPERS } from '../Wrappers/Wrappers.constants'
@@ -177,7 +177,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [
<Vault className={cn('inset-0 p-2 text-black w-full h-full', className)} {...props} /> <Vault className={cn('inset-0 p-2 text-black w-full h-full', className)} {...props} />
), ),
description: 'Application level encryption for your project', description: 'Application level encryption for your project',
docsUrl: 'https://supabase.com/docs', docsUrl: DOCS_URL,
author: authorSupabase, author: authorSupabase,
navigation: [ navigation: [
{ {
@@ -221,7 +221,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [
), ),
description: description:
'Send real-time data from your database to another system when a table event occurs', 'Send real-time data from your database to another system when a table event occurs',
docsUrl: 'https://supabase.com/docs', docsUrl: DOCS_URL,
author: authorSupabase, author: authorSupabase,
requiredExtensions: [], requiredExtensions: [],
navigation: [ navigation: [
@@ -275,7 +275,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [
/> />
), ),
description: 'Run GraphQL queries through our interactive in-browser IDE', description: 'Run GraphQL queries through our interactive in-browser IDE',
docsUrl: 'https://supabase.com/docs', docsUrl: DOCS_URL,
author: authorSupabase, author: authorSupabase,
navigation: [ navigation: [
{ {

View File

@@ -10,6 +10,7 @@ import { DocsButton } from 'components/ui/DocsButton'
import { useVaultSecretsQuery } from 'data/vault/vault-secrets-query' import { useVaultSecretsQuery } from 'data/vault/vault-secrets-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import type { VaultSecret } from 'types' import type { VaultSecret } from 'types'
import { import {
Button, Button,
@@ -127,7 +128,7 @@ export const SecretsManagement = () => {
> >
Refresh Refresh
</Button> </Button>
<DocsButton href="https://supabase.com/docs/guides/database/vault" /> <DocsButton href={`${DOCS_URL}/guides/database/vault`} />
<ButtonTooltip <ButtonTooltip
type="primary" type="primary"
disabled={!canManageSecrets} disabled={!canManageSecrets}

View File

@@ -1,4 +1,4 @@
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { CreateIcebergWrapperSheet } from './CreateIcebergWrapperSheet' import { CreateIcebergWrapperSheet } from './CreateIcebergWrapperSheet'
import type { ServerOption, WrapperMeta } from './Wrappers.types' import type { ServerOption, WrapperMeta } from './Wrappers.types'
@@ -46,7 +46,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Payment processing and subscription management', description: 'Payment processing and subscription management',
extensionName: 'StripeFdw', extensionName: 'StripeFdw',
label: 'Stripe', label: 'Stripe',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/stripe', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/stripe`,
server: { server: {
options: [ options: [
{ {
@@ -1213,7 +1213,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Backend-as-a-Service with real-time database', description: 'Backend-as-a-Service with real-time database',
extensionName: 'FirebaseFdw', extensionName: 'FirebaseFdw',
label: 'Firebase', label: 'Firebase',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/firebase', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/firebase`,
server: { server: {
options: [ options: [
{ {
@@ -1340,7 +1340,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Cloud object storage service', description: 'Cloud object storage service',
extensionName: 'S3Fdw', extensionName: 'S3Fdw',
label: 'S3', label: 'S3',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/s3', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/s3`,
server: { server: {
options: [ options: [
{ {
@@ -1424,7 +1424,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Column-oriented analytics database', description: 'Column-oriented analytics database',
extensionName: 'ClickHouseFdw', extensionName: 'ClickHouseFdw',
label: 'ClickHouse', label: 'ClickHouse',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/clickhouse', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/clickhouse`,
server: { server: {
options: [ options: [
{ {
@@ -1469,7 +1469,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Serverless data warehouse and analytics', description: 'Serverless data warehouse and analytics',
extensionName: 'BigQueryFdw', extensionName: 'BigQueryFdw',
label: 'BigQuery', label: 'BigQuery',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/bigquery', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/bigquery`,
server: { server: {
options: [ options: [
{ {
@@ -1544,7 +1544,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'No-code database and spreadsheet platform', description: 'No-code database and spreadsheet platform',
extensionName: 'airtableFdw', extensionName: 'airtableFdw',
label: 'Airtable', label: 'Airtable',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/airtable', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/airtable`,
server: { server: {
options: [ options: [
{ {
@@ -1587,7 +1587,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Log management and analytics service', description: 'Log management and analytics service',
extensionName: 'logflareFdw', extensionName: 'logflareFdw',
label: 'Logflare', label: 'Logflare',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/logflare', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/logflare`,
server: { server: {
options: [ options: [
{ {
@@ -1623,7 +1623,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Identity and access management platform', description: 'Identity and access management platform',
extensionName: 'Auth0Fdw', extensionName: 'Auth0Fdw',
label: 'Auth0', label: 'Auth0',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/auth0', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/auth0`,
minimumExtensionVersion: '0.3.0', minimumExtensionVersion: '0.3.0',
server: { server: {
options: [ options: [
@@ -1754,7 +1754,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'AWS user authentication and authorization', description: 'AWS user authentication and authorization',
extensionName: 'CognitoFdw', extensionName: 'CognitoFdw',
label: 'Cognito', label: 'Cognito',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/cognito', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/cognito`,
minimumExtensionVersion: '0.3.0', minimumExtensionVersion: '0.3.0',
server: { server: {
options: [ options: [
@@ -1849,7 +1849,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Microsoft SQL Server database', description: 'Microsoft SQL Server database',
extensionName: 'mssqlFdw', extensionName: 'mssqlFdw',
label: 'Microsoft SQL Server', label: 'Microsoft SQL Server',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/mssql', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/mssql`,
minimumExtensionVersion: '0.3.0', minimumExtensionVersion: '0.3.0',
server: { server: {
options: [ options: [
@@ -1886,7 +1886,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'In-memory data structure store', description: 'In-memory data structure store',
extensionName: 'redisFdw', extensionName: 'redisFdw',
label: 'Redis', label: 'Redis',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/redis', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/redis`,
minimumExtensionVersion: '0.3.0', minimumExtensionVersion: '0.3.0',
server: { server: {
options: [ options: [
@@ -1969,7 +1969,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Subscription billing and payments platform', description: 'Subscription billing and payments platform',
extensionName: 'paddleFdw', extensionName: 'paddleFdw',
label: 'Paddle', label: 'Paddle',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/paddle', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/paddle`,
minimumExtensionVersion: '0.4.0', minimumExtensionVersion: '0.4.0',
server: { server: {
options: [ options: [
@@ -2070,7 +2070,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Cloud data warehouse platform', description: 'Cloud data warehouse platform',
extensionName: 'snowflakeFdw', extensionName: 'snowflakeFdw',
label: 'Snowflake', label: 'Snowflake',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/snowflake', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/snowflake`,
minimumExtensionVersion: '0.4.0', minimumExtensionVersion: '0.4.0',
server: { server: {
options: [ options: [
@@ -2173,7 +2173,7 @@ export const WRAPPERS: WrapperMeta[] = [
description: 'Iceberg is a data warehouse', description: 'Iceberg is a data warehouse',
extensionName: 'icebergFdw', extensionName: 'icebergFdw',
label: 'Iceberg', label: 'Iceberg',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/iceberg', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/iceberg`,
minimumExtensionVersion: '0.5.3', minimumExtensionVersion: '0.5.3',
createComponent: CreateIcebergWrapperSheet, createComponent: CreateIcebergWrapperSheet,
server: { server: {
@@ -2259,7 +2259,7 @@ export const WRAPPERS: WrapperMeta[] = [
icon: `${BASE_PATH}/img/icons/cal-com-icon.svg`, icon: `${BASE_PATH}/img/icons/cal-com-icon.svg`,
extensionName: 'calFdw', extensionName: 'calFdw',
label: 'Cal.com', label: 'Cal.com',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/cal', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/cal`,
minimumExtensionVersion: '0.4.0', minimumExtensionVersion: '0.4.0',
server: { server: {
options: [ options: [
@@ -2466,7 +2466,7 @@ export const WRAPPERS: WrapperMeta[] = [
icon: `${BASE_PATH}/img/icons/calendly-icon.svg`, icon: `${BASE_PATH}/img/icons/calendly-icon.svg`,
extensionName: 'calendlyFdw', extensionName: 'calendlyFdw',
label: 'Calendly', label: 'Calendly',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/calendly', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/calendly`,
minimumExtensionVersion: '0.4.0', minimumExtensionVersion: '0.4.0',
server: { server: {
options: [ options: [
@@ -2703,7 +2703,7 @@ export const WRAPPERS: WrapperMeta[] = [
icon: `${BASE_PATH}/img/icons/clerk-icon.svg`, icon: `${BASE_PATH}/img/icons/clerk-icon.svg`,
extensionName: 'clerkFdw', extensionName: 'clerkFdw',
label: 'Clerk', label: 'Clerk',
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/clerk', docsUrl: `${DOCS_URL}/guides/database/extensions/wrappers/clerk`,
minimumExtensionVersion: '0.4.0', minimumExtensionVersion: '0.4.0',
server: { server: {
options: [ options: [

View File

@@ -2,11 +2,12 @@ import Link from 'next/link'
import ReactMarkdown from 'react-markdown' import ReactMarkdown from 'react-markdown'
import { createLintSummaryPrompt, lintInfoMap } from 'components/interfaces/Linter/Linter.utils' import { createLintSummaryPrompt, lintInfoMap } from 'components/interfaces/Linter/Linter.utils'
import { EntityTypeIcon, LintCTA, LintCategoryBadge, LintEntity } from './Linter.utils'
import { Lint } from 'data/lint/lint-query' import { Lint } from 'data/lint/lint-query'
import { DOCS_URL } from 'lib/constants'
import { ExternalLink } from 'lucide-react'
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state' import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { AiIconAnimation, Button } from 'ui' import { AiIconAnimation, Button } from 'ui'
import { ExternalLink } from 'lucide-react' import { EntityTypeIcon, LintCTA, LintEntity } from './Linter.utils'
interface LintDetailProps { interface LintDetailProps {
lint: Lint lint: Lint
@@ -54,7 +55,7 @@ const LintDetail = ({ lint, projectRef, onAskAssistant }: LintDetailProps) => {
<Link <Link
href={ href={
lintInfoMap.find((item) => item.name === lint.name)?.docsLink || lintInfoMap.find((item) => item.name === lint.name)?.docsLink ||
'https://supabase.com/docs/guides/database/database-linter' `${DOCS_URL}/guides/database/database-linter`
} }
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"

View File

@@ -14,6 +14,7 @@ import Link from 'next/link'
import { LINTER_LEVELS, LintInfo } from 'components/interfaces/Linter/Linter.constants' import { LINTER_LEVELS, LintInfo } from 'components/interfaces/Linter/Linter.constants'
import { LINT_TYPES, Lint } from 'data/lint/lint-query' import { LINT_TYPES, Lint } from 'data/lint/lint-query'
import { DOCS_URL } from 'lib/constants'
import { Badge, Button } from 'ui' import { Badge, Button } from 'ui'
export const lintInfoMap: LintInfo[] = [ export const lintInfoMap: LintInfo[] = [
@@ -24,8 +25,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/database/indexes?schema=${metadata?.schema}`, `/project/${projectRef}/database/indexes?schema=${metadata?.schema}`,
linkText: 'Create an index', linkText: 'Create an index',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0001_unindexed_foreign_keys`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0001_unindexed_foreign_keys',
category: 'performance', category: 'performance',
}, },
{ {
@@ -34,8 +34,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Lock className="text-foreground-muted" size={15} strokeWidth={1.5} />, icon: <Lock className="text-foreground-muted" size={15} strokeWidth={1.5} />,
link: ({ projectRef }) => `/project/${projectRef}/editor`, link: ({ projectRef }) => `/project/${projectRef}/editor`,
linkText: 'View table', linkText: 'View table',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0002_auth_users_exposed`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0002_auth_users_exposed',
category: 'security', category: 'security',
}, },
{ {
@@ -44,8 +43,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/policies`, link: ({ projectRef }) => `/project/${projectRef}/auth/policies`,
linkText: 'View policies', linkText: 'View policies',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0003_auth_rls_initplan`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0003_auth_rls_initplan',
category: 'performance', category: 'performance',
}, },
{ {
@@ -54,8 +52,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/editor`, link: ({ projectRef }) => `/project/${projectRef}/editor`,
linkText: 'View table', linkText: 'View table',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0004_no_primary_key`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0004_no_primary_key',
category: 'performance', category: 'performance',
}, },
{ {
@@ -65,8 +62,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`, `/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`,
linkText: 'View index', linkText: 'View index',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0005_unused_index`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0005_unused_index',
category: 'performance', category: 'performance',
}, },
{ {
@@ -76,8 +72,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`,
linkText: 'View policies', linkText: 'View policies',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0006_multiple_permissive_policies`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0006_multiple_permissive_policies',
category: 'performance', category: 'performance',
}, },
{ {
@@ -87,8 +82,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`,
linkText: 'View policies', linkText: 'View policies',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0007_policy_exists_rls_disabled`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0007_policy_exists_rls_disabled',
category: 'security', category: 'security',
}, },
{ {
@@ -98,8 +92,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`,
linkText: 'View table', linkText: 'View table',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0008_rls_enabled_no_policy`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0008_rls_enabled_no_policy',
category: 'security', category: 'security',
}, },
{ {
@@ -109,8 +102,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`, `/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`,
linkText: 'View index', linkText: 'View index',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0009_duplicate_index`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0009_duplicate_index',
category: 'performance', category: 'performance',
}, },
{ {
@@ -118,10 +110,9 @@ export const lintInfoMap: LintInfo[] = [
title: 'Security Definer View', title: 'Security Definer View',
icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />, icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />,
link: () => link: () =>
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view', `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view`,
linkText: 'View docs', linkText: 'View docs',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view',
category: 'security', category: 'security',
}, },
{ {
@@ -131,8 +122,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/database/functions?schema=${metadata?.schema}&search=${metadata?.name}`, `/project/${projectRef}/database/functions?schema=${metadata?.schema}&search=${metadata?.name}`,
linkText: 'View functions', linkText: 'View functions',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0011_function_search_path_mutable`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0011_function_search_path_mutable',
category: 'security', category: 'security',
}, },
{ {
@@ -142,8 +132,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`,
linkText: 'View policies', linkText: 'View policies',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0013_rls_disabled_in_public`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0013_rls_disabled_in_public',
category: 'security', category: 'security',
}, },
{ {
@@ -153,8 +142,7 @@ export const lintInfoMap: LintInfo[] = [
link: ({ projectRef, metadata }) => link: ({ projectRef, metadata }) =>
`/project/${projectRef}/database/extensions?filter=${metadata?.name}`, `/project/${projectRef}/database/extensions?filter=${metadata?.name}`,
linkText: 'View extension', linkText: 'View extension',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0014_extension_in_public`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0014_extension_in_public',
category: 'security', category: 'security',
}, },
{ {
@@ -163,7 +151,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Clock className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Clock className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/providers`, link: ({ projectRef }) => `/project/${projectRef}/auth/providers`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/going-into-prod#security', docsLink: `${DOCS_URL}/guides/platform/going-into-prod#security`,
category: 'security', category: 'security',
}, },
{ {
@@ -172,7 +160,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/providers`, link: ({ projectRef }) => `/project/${projectRef}/auth/providers`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/going-into-prod#security', docsLink: `${DOCS_URL}/guides/platform/going-into-prod#security`,
category: 'security', category: 'security',
}, },
{ {
@@ -181,30 +169,25 @@ export const lintInfoMap: LintInfo[] = [
icon: <User className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <User className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/policies`, link: ({ projectRef }) => `/project/${projectRef}/auth/policies`,
linkText: 'View policies', linkText: 'View policies',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0015_rls_references_user_metadata`,
'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0015_rls_references_user_metadata',
category: 'security', category: 'security',
}, },
{ {
name: 'materialized_view_in_api', name: 'materialized_view_in_api',
title: 'Materialized View in API', title: 'Materialized View in API',
icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />, icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />,
link: () => link: () => `${DOCS_URL}/guides/database/database-advisors?lint=0016_materialized_view_in_api`,
`https://supabase.com/docs/guides/database/database-advisors?lint=0016_materialized_view_in_api`,
linkText: 'View docs', linkText: 'View docs',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-advisors?lint=0016_materialized_view_in_api`,
'https://supabase.com/docs/guides/database/database-advisors?lint=0016_materialized_view_in_api',
category: 'security', category: 'security',
}, },
{ {
name: 'foreign_table_in_api', name: 'foreign_table_in_api',
title: 'Foreign Table in API', title: 'Foreign Table in API',
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />, icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />,
link: () => link: () => `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`,
`https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api`,
linkText: 'View docs', linkText: 'View docs',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`,
'https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api',
category: 'security', category: 'security',
}, },
{ {
@@ -212,10 +195,9 @@ export const lintInfoMap: LintInfo[] = [
title: 'Unsupported reg types', title: 'Unsupported reg types',
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />, icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />,
link: () => link: () =>
`https://supabase.com/docs/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint`, `${DOCS_URL}/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
linkText: 'View docs', linkText: 'View docs',
docsLink: docsLink: `${DOCS_URL}/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
'https://supabase.com/docs/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint',
category: 'security', category: 'security',
}, },
{ {
@@ -224,7 +206,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/database/settings`, link: ({ projectRef }) => `/project/${projectRef}/database/settings`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/ssl-enforcement', docsLink: `${DOCS_URL}/guides/platform/ssl-enforcement`,
category: 'security', category: 'security',
}, },
{ {
@@ -233,7 +215,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/database/settings`, link: ({ projectRef }) => `/project/${projectRef}/database/settings`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/network-restrictions', docsLink: `${DOCS_URL}/guides/platform/network-restrictions`,
category: 'security', category: 'security',
}, },
{ {
@@ -242,7 +224,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/going-into-prod#security', docsLink: `${DOCS_URL}/guides/platform/going-into-prod#security`,
category: 'security', category: 'security',
}, },
{ {
@@ -251,7 +233,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <Ruler className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/database/backups/pitr`, link: ({ projectRef }) => `/project/${projectRef}/database/backups/pitr`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/backups#point-in-time-recovery', docsLink: `${DOCS_URL}/guides/platform/backups#point-in-time-recovery`,
category: 'security', category: 'security',
}, },
{ {
@@ -260,8 +242,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings', linkText: 'View settings',
docsLink: docsLink: `${DOCS_URL}/guides/auth/password-security#password-strength-and-leaked-password-protection`,
'https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection',
category: 'security', category: 'security',
}, },
{ {
@@ -270,7 +251,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`, link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa', docsLink: `${DOCS_URL}/guides/auth/auth-mfa`,
category: 'security', category: 'security',
}, },
{ {
@@ -279,7 +260,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/password-security', docsLink: `${DOCS_URL}/guides/auth/password-security`,
category: 'security', category: 'security',
}, },
{ {
@@ -288,7 +269,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/settings/api`, link: ({ projectRef }) => `/project/${projectRef}/settings/api`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/api/api-keys#the-servicerole-key', docsLink: `${DOCS_URL}/guides/api/api-keys#the-servicerole-key`,
category: 'security', category: 'security',
}, },
{ {
@@ -297,7 +278,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`, link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa', docsLink: `${DOCS_URL}/guides/auth/auth-mfa`,
category: 'security', category: 'security',
}, },
{ {
@@ -306,7 +287,7 @@ export const lintInfoMap: LintInfo[] = [
icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />, icon: <LockIcon className="text-foreground-muted" size={15} strokeWidth={1} />,
link: ({ projectRef }) => `/project/${projectRef}/settings/infrastructure`, link: ({ projectRef }) => `/project/${projectRef}/settings/infrastructure`,
linkText: 'View settings', linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/upgrading', docsLink: `${DOCS_URL}/guides/platform/upgrading`,
category: 'security', category: 'security',
}, },
] ]

View File

@@ -1,6 +1,7 @@
import { X } from 'lucide-react'
import { LOCAL_STORAGE_KEYS } from 'common' import { LOCAL_STORAGE_KEYS } from 'common'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { DOCS_URL } from 'lib/constants'
import { X } from 'lucide-react'
import { Button, cn } from 'ui' import { Button, cn } from 'ui'
import { Markdown } from '../Markdown' import { Markdown } from '../Markdown'
@@ -75,8 +76,8 @@ const LinterPageFooter = ({
<p>Inspect your database for potential issues</p> <p>Inspect your database for potential issues</p>
<Markdown <Markdown
className="text-xs" className="text-xs"
content="The Supabase CLI comes with a range of tools to help inspect your Postgres instances for content={`The Supabase CLI comes with a range of tools to help inspect your Postgres instances for
potential issues. [Learn more here](https://supabase.com/docs/guides/database/inspect)." potential issues. [Learn more here](${DOCS_URL}/guides/database/inspect).`}
/> />
</div> </div>
)} )}

View File

@@ -6,9 +6,9 @@ import { toast } from 'sonner'
import { z } from 'zod' import { z } from 'zod'
import { useParams } from 'common' import { useParams } from 'common'
import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
Form_Shadcn_, Form_Shadcn_,
@@ -533,7 +533,7 @@ export function LogDrainDestinationSheetForm({
<DocsButton <DocsButton
abbrev={false} abbrev={false}
className="w-min" className="w-min"
href="https://supabase.com/docs/guides/platform/log-drains" href={`${DOCS_URL}/guides/platform/log-drains`}
/> />
</div> </div>
} }

View File

@@ -1,4 +1,5 @@
import { PricingMetric } from 'data/analytics/org-daily-stats-query' import { PricingMetric } from 'data/analytics/org-daily-stats-query'
import { DOCS_URL } from 'lib/constants'
export const USAGE_APPROACHING_THRESHOLD = 0.8 export const USAGE_APPROACHING_THRESHOLD = 0.8
@@ -111,7 +112,7 @@ export const BILLING_BREAKDOWN_METRICS: Metric[] = [
tip: 'Each project gets provisioned with 8 GB of GP3 disk for free. When you get close to the disk size limit, we autoscale your disk by 1.5x. Each GB of provisioned disk size beyond 8 GB incurs a GB-Hr every hour. Each extra GB is billed at $0.125/month ($0.000171/GB-Hr), prorated down to the hour.', tip: 'Each project gets provisioned with 8 GB of GP3 disk for free. When you get close to the disk size limit, we autoscale your disk by 1.5x. Each GB of provisioned disk size beyond 8 GB incurs a GB-Hr every hour. Each extra GB is billed at $0.125/month ($0.000171/GB-Hr), prorated down to the hour.',
docLink: { docLink: {
title: 'Read more', title: 'Read more',
url: 'https://supabase.com/docs/guides/platform/manage-your-usage/disk-size', url: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`,
}, },
}, },
{ {

View File

@@ -2,6 +2,7 @@ import Link from 'next/link'
import { ComputeUsageMetric, PricingMetric } from 'data/analytics/org-daily-stats-query' import { ComputeUsageMetric, PricingMetric } from 'data/analytics/org-daily-stats-query'
import type { OrgUsageResponse } from 'data/usage/org-usage-query' import type { OrgUsageResponse } from 'data/usage/org-usage-query'
import { DOCS_URL } from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { ChevronRight } from 'lucide-react' import { ChevronRight } from 'lucide-react'
import { useMemo } from 'react' import { useMemo } from 'react'
@@ -74,7 +75,7 @@ export const ComputeMetric = ({
Each Preview branch is a separate environment with all Supabase services (Database, Each Preview branch is a separate environment with all Supabase services (Database,
Auth, Storage, etc.).{' '} Auth, Storage, etc.).{' '}
<Link <Link
href="https://supabase.com/docs/guides/platform/manage-your-usage/branching" href={`${DOCS_URL}/guides/platform/manage-your-usage/branching`}
target="_blank" target="_blank"
className="transition text-brand hover:text-brand-600 underline" className="transition text-brand hover:text-brand-600 underline"
> >
@@ -87,7 +88,7 @@ export const ComputeMetric = ({
active, it incurs compute costs based on the compute size of your project. Paused active, it incurs compute costs based on the compute size of your project. Paused
projects do not incur compute costs.{' '} projects do not incur compute costs.{' '}
<Link <Link
href="https://supabase.com/docs/guides/platform/manage-your-usage/compute" href={`${DOCS_URL}/guides/platform/manage-your-usage/compute`}
target="_blank" target="_blank"
className="transition text-brand hover:text-brand-600 underline" className="transition text-brand hover:text-brand-600 underline"
> >

View File

@@ -2,70 +2,50 @@ import Link from 'next/link'
import AlertError from 'components/ui/AlertError' import AlertError from 'components/ui/AlertError'
import ShimmeringLoader from 'components/ui/ShimmeringLoader' import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { PricingMetric } from 'data/analytics/org-daily-stats-query'
import { import {
UpcomingInvoiceResponse, UpcomingInvoiceResponse,
useOrgUpcomingInvoiceQuery, useOrgUpcomingInvoiceQuery,
} from 'data/invoices/org-invoice-upcoming-query' } from 'data/invoices/org-invoice-upcoming-query'
import { DOCS_URL } from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { Table, TableBody, TableCell, TableFooter, TableRow } from 'ui'
import { billingMetricUnit, formatUsage } from '../helpers'
import { InfoTooltip } from 'ui-patterns/info-tooltip'
import { PricingMetric } from 'data/analytics/org-daily-stats-query'
import _ from 'lodash'
import React from 'react' import React from 'react'
import { Table, TableBody, TableCell, TableFooter, TableRow } from 'ui'
import { InfoTooltip } from 'ui-patterns/info-tooltip'
import { billingMetricUnit, formatUsage } from '../helpers'
export interface UpcomingInvoiceProps { export interface UpcomingInvoiceProps {
slug?: string slug?: string
} }
const usageBillingDocsLink: { [K in PricingMetric]?: string } = { const usageBillingDocsLink: { [K in PricingMetric]?: string } = {
[PricingMetric.MONTHLY_ACTIVE_USERS]: [PricingMetric.MONTHLY_ACTIVE_USERS]: `${DOCS_URL}/guides/platform/manage-your-usage/monthly-active-users`,
'https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users', [PricingMetric.MONTHLY_ACTIVE_SSO_USERS]: `${DOCS_URL}/guides/platform/manage-your-usage/monthly-active-users-sso`,
[PricingMetric.MONTHLY_ACTIVE_SSO_USERS]: [PricingMetric.MONTHLY_ACTIVE_THIRD_PARTY_USERS]: `${DOCS_URL}/guides/platform/manage-your-usage/monthly-active-users-third-party`,
'https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users-sso', [PricingMetric.AUTH_MFA_PHONE]: `${DOCS_URL}/guides/platform/manage-your-usage/advanced-mfa-phone`,
[PricingMetric.MONTHLY_ACTIVE_THIRD_PARTY_USERS]:
'https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users-third-party',
[PricingMetric.AUTH_MFA_PHONE]:
'https://supabase.com/docs/guides/platform/manage-your-usage/advanced-mfa-phone',
[PricingMetric.EGRESS]: 'https://supabase.com/docs/guides/platform/manage-your-usage/egress', [PricingMetric.EGRESS]: `${DOCS_URL}/guides/platform/manage-your-usage/egress`,
[PricingMetric.CACHED_EGRESS]: [PricingMetric.CACHED_EGRESS]: `${DOCS_URL}/guides/platform/manage-your-usage/egress`,
'https://supabase.com/docs/guides/platform/manage-your-usage/egress',
[PricingMetric.FUNCTION_INVOCATIONS]: [PricingMetric.FUNCTION_INVOCATIONS]: `${DOCS_URL}/guides/platform/manage-your-usage/edge-function-invocations`,
'https://supabase.com/docs/guides/platform/manage-your-usage/edge-function-invocations',
[PricingMetric.STORAGE_SIZE]: [PricingMetric.STORAGE_SIZE]: `${DOCS_URL}/guides/platform/manage-your-usage/storage-size`,
'https://supabase.com/docs/guides/platform/manage-your-usage/storage-size', [PricingMetric.STORAGE_IMAGES_TRANSFORMED]: `${DOCS_URL}/guides/platform/manage-your-usage/storage-image-transformations`,
[PricingMetric.STORAGE_IMAGES_TRANSFORMED]:
'https://supabase.com/docs/guides/platform/manage-your-usage/storage-image-transformations',
[PricingMetric.REALTIME_MESSAGE_COUNT]: [PricingMetric.REALTIME_MESSAGE_COUNT]: `${DOCS_URL}/guides/platform/manage-your-usage/realtime-messages`,
'https://supabase.com/docs/guides/platform/manage-your-usage/realtime-messages', [PricingMetric.REALTIME_PEAK_CONNECTIONS]: `${DOCS_URL}/guides/platform/manage-your-usage/realtime-peak-connections`,
[PricingMetric.REALTIME_PEAK_CONNECTIONS]:
'https://supabase.com/docs/guides/platform/manage-your-usage/realtime-peak-connections',
[PricingMetric.CUSTOM_DOMAIN]: [PricingMetric.CUSTOM_DOMAIN]: `${DOCS_URL}/guides/platform/manage-your-usage/custom-domains`,
'https://supabase.com/docs/guides/platform/manage-your-usage/custom-domains', [PricingMetric.IPV4]: `${DOCS_URL}/guides/platform/manage-your-usage/ipv4`,
[PricingMetric.IPV4]: 'https://supabase.com/docs/guides/platform/manage-your-usage/ipv4', [PricingMetric.PITR_7]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`,
[PricingMetric.PITR_7]: [PricingMetric.PITR_14]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`,
'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', [PricingMetric.PITR_28]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`,
[PricingMetric.PITR_14]: [PricingMetric.DISK_SIZE_GB_HOURS_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`,
'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', [PricingMetric.DISK_SIZE_GB_HOURS_IO2]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`,
[PricingMetric.PITR_28]: [PricingMetric.DISK_IOPS_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-iops`,
'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', [PricingMetric.DISK_IOPS_IO2]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-iops`,
[PricingMetric.DISK_SIZE_GB_HOURS_GP3]: [PricingMetric.DISK_THROUGHPUT_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-throughput`,
'https://supabase.com/docs/guides/platform/manage-your-usage/disk-size', [PricingMetric.LOG_DRAIN]: `${DOCS_URL}/guides/platform/manage-your-usage/log-drains`,
[PricingMetric.DISK_SIZE_GB_HOURS_IO2]:
'https://supabase.com/docs/guides/platform/manage-your-usage/disk-size',
[PricingMetric.DISK_IOPS_GP3]:
'https://supabase.com/docs/guides/platform/manage-your-usage/disk-iops',
[PricingMetric.DISK_IOPS_IO2]:
'https://supabase.com/docs/guides/platform/manage-your-usage/disk-iops',
[PricingMetric.DISK_THROUGHPUT_GP3]:
'https://supabase.com/docs/guides/platform/manage-your-usage/disk-throughput',
[PricingMetric.LOG_DRAIN]:
'https://supabase.com/docs/guides/platform/manage-your-usage/log-drains',
} }
const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
@@ -147,7 +127,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
compute costs starting at <span translate="no">$10</span>/month, independent compute costs starting at <span translate="no">$10</span>/month, independent
of activity. See{' '} of activity. See{' '}
<Link <Link
href={'https://supabase.com/docs/guides/platform/manage-your-usage/compute'} href={`${DOCS_URL}/guides/platform/manage-your-usage/compute`}
target="_blank" target="_blank"
> >
docs docs
@@ -167,9 +147,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
Compute, Disk Size, provisioned Disk IOPS, provisioned Disk Throughput, and Compute, Disk Size, provisioned Disk IOPS, provisioned Disk Throughput, and
IPv4. See{' '} IPv4. See{' '}
<Link <Link
href={ href={`${DOCS_URL}/guides/platform/manage-your-usage/read-replicas`}
'https://supabase.com/docs/guides/platform/manage-your-usage/read-replicas'
}
target="_blank" target="_blank"
> >
docs docs
@@ -200,9 +178,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
See{' '} See{' '}
<Link <Link
className="underline" className="underline"
href={ href={`${DOCS_URL}/guides/platform/manage-your-usage/branching`}
'https://supabase.com/docs/guides/platform/manage-your-usage/branching'
}
target="_blank" target="_blank"
> >
docs docs

View File

@@ -12,17 +12,16 @@ import {
} from 'components/layouts/Scaffold' } from 'components/layouts/Scaffold'
import AlertError from 'components/ui/AlertError' import AlertError from 'components/ui/AlertError'
import NoPermission from 'components/ui/NoPermission' import NoPermission from 'components/ui/NoPermission'
import PartnerIcon from 'components/ui/PartnerIcon'
import { PARTNER_TO_NAME } from 'components/ui/PartnerManagedResource' import { PARTNER_TO_NAME } from 'components/ui/PartnerManagedResource'
import ShimmeringLoader from 'components/ui/ShimmeringLoader' import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { MANAGED_BY } from 'lib/constants/infrastructure' import { MANAGED_BY } from 'lib/constants/infrastructure'
import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings' import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings'
import { Alert, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { Alert, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui'
import PartnerIcon from 'components/ui/PartnerIcon'
import ProjectUpdateDisabledTooltip from '../ProjectUpdateDisabledTooltip' import ProjectUpdateDisabledTooltip from '../ProjectUpdateDisabledTooltip'
import SpendCapSidePanel from './SpendCapSidePanel' import SpendCapSidePanel from './SpendCapSidePanel'
@@ -78,7 +77,7 @@ const CostControl = ({}: CostControlProps) => {
<p className="text-sm text-foreground-light m-0">More information</p> <p className="text-sm text-foreground-light m-0">More information</p>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/platform/cost-control#spend-cap" href={`${DOCS_URL}/guides/platform/cost-control#spend-cap`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -10,7 +10,7 @@ import Table from 'components/to-be-cleaned/Table'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation' import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { BASE_PATH, PRICING_TIER_PRODUCT_IDS } from 'lib/constants' import { BASE_PATH, DOCS_URL, PRICING_TIER_PRODUCT_IDS } from 'lib/constants'
import { ChevronRight, ExternalLink } from 'lucide-react' import { ChevronRight, ExternalLink } from 'lucide-react'
import { pricing } from 'shared-data/pricing' import { pricing } from 'shared-data/pricing'
import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings' import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings'
@@ -108,7 +108,7 @@ const SpendCapSidePanel = () => {
<h4>Spend cap</h4> <h4>Spend cap</h4>
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/platform/cost-control#spend-cap" href={`${DOCS_URL}/guides/platform/cost-control#spend-cap`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -6,6 +6,7 @@ import { PricingMetric } from 'data/analytics/org-daily-stats-query'
import { VIOLATION_TYPE_LABELS } from 'data/usage/constants' import { VIOLATION_TYPE_LABELS } from 'data/usage/constants'
import { useOrgUsageQuery } from 'data/usage/org-usage-query' import { useOrgUsageQuery } from 'data/usage/org-usage-query'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { usePathname } from 'next/navigation' import { usePathname } from 'next/navigation'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
@@ -94,9 +95,7 @@ export const Restriction = () => {
</Button> </Button>
)} )}
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a href="https://supabase.com/docs/guides/platform/cost-control#spend-cap"> <a href={`${DOCS_URL}/guides/platform/cost-control#spend-cap`}>About spend cap</a>
About spend cap
</a>
</Button> </Button>
</div> </div>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
@@ -139,7 +138,7 @@ export const Restriction = () => {
)} )}
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a href="https://supabase.com/docs/guides/platform/billing-faq#fair-use-policy"> <a href={`${DOCS_URL}/guides/platform/billing-faq#fair-use-policy`}>
About Fair Use Policy About Fair Use Policy
</a> </a>
</Button> </Button>
@@ -179,7 +178,7 @@ export const Restriction = () => {
</Button> </Button>
)} )}
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a href="https://supabase.com/docs/guides/platform/billing-faq#fair-use-policy"> <a href={`${DOCS_URL}/guides/platform/billing-faq#fair-use-policy`}>
About Fair Use Policy About Fair Use Policy
</a> </a>
</Button> </Button>
@@ -217,7 +216,7 @@ export const Restriction = () => {
</Button> </Button>
)} )}
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a href="https://supabase.com/docs/guides/platform/billing-faq#fair-use-policy"> <a href={`${DOCS_URL}/guides/platform/billing-faq#fair-use-policy`}>
About Fair Use Policy About Fair Use Policy
</a> </a>
</Button> </Button>

View File

@@ -19,7 +19,12 @@ import { useConfirmPendingSubscriptionChangeMutation } from 'data/subscriptions/
import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation' import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation'
import { SubscriptionTier } from 'data/subscriptions/types' import { SubscriptionTier } from 'data/subscriptions/types'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { PRICING_TIER_PRODUCT_IDS, PROJECT_STATUS, STRIPE_PUBLIC_KEY } from 'lib/constants' import {
DOCS_URL,
PRICING_TIER_PRODUCT_IDS,
PROJECT_STATUS,
STRIPE_PUBLIC_KEY,
} from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { useTheme } from 'next-themes' import { useTheme } from 'next-themes'
import { plans as subscriptionsPlans } from 'shared-data/plans' import { plans as subscriptionsPlans } from 'shared-data/plans'
@@ -351,9 +356,7 @@ export const SubscriptionPlanUpdateDialog = ({
Credits; additional projects start at <span translate="no">$10</span> Credits; additional projects start at <span translate="no">$10</span>
/month regardless of usage.{' '} /month regardless of usage.{' '}
<Link <Link
href={ href={`${DOCS_URL}/guides/platform/manage-your-usage/compute`}
'https://supabase.com/docs/guides/platform/manage-your-usage/compute'
}
target="_blank" target="_blank"
> >
Learn more Learn more
@@ -589,7 +592,7 @@ export const SubscriptionPlanUpdateDialog = ({
/month regardless of usage.{' '} /month regardless of usage.{' '}
</div> </div>
<Link <Link
href={'https://supabase.com/docs/guides/platform/manage-your-usage/compute'} href={`${DOCS_URL}/guides/platform/manage-your-usage/compute`}
target="_blank" target="_blank"
className="underline" className="underline"
> >

View File

@@ -1,20 +1,22 @@
import { useAwsManagedOrganizationCreateMutation } from '../../../../data/organizations/organization-create-mutation' import Link from 'next/link'
import { toast } from 'sonner' import { useRouter } from 'next/router'
import { SubmitHandler } from 'react-hook-form' import { SubmitHandler } from 'react-hook-form'
import NewAwsMarketplaceOrgForm, { import { toast } from 'sonner'
CREATE_AWS_MANAGED_ORG_FORM_ID,
NewMarketplaceOrgForm, import { useAwsManagedOrganizationCreateMutation } from 'data/organizations/organization-create-mutation'
} from './NewAwsMarketplaceOrgForm' import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui'
import { import {
ScaffoldSection, ScaffoldSection,
ScaffoldSectionContent, ScaffoldSectionContent,
ScaffoldSectionDetail, ScaffoldSectionDetail,
} from '../../../layouts/Scaffold' } from '../../../layouts/Scaffold'
import Link from 'next/link'
import { Button } from 'ui'
import { useRouter } from 'next/router'
import AwsMarketplaceAutoRenewalWarning from './AwsMarketplaceAutoRenewalWarning' import AwsMarketplaceAutoRenewalWarning from './AwsMarketplaceAutoRenewalWarning'
import { CloudMarketplaceOnboardingInfo } from './cloud-marketplace-query' import { CloudMarketplaceOnboardingInfo } from './cloud-marketplace-query'
import NewAwsMarketplaceOrgForm, {
CREATE_AWS_MANAGED_ORG_FORM_ID,
NewMarketplaceOrgForm,
} from './NewAwsMarketplaceOrgForm'
interface Props { interface Props {
onboardingInfo?: CloudMarketplaceOnboardingInfo | undefined onboardingInfo?: CloudMarketplaceOnboardingInfo | undefined
@@ -61,11 +63,7 @@ const AwsMarketplaceCreateNewOrg = ({ onboardingInfo }: Props) => {
<p> <p>
You can read more on billing through AWS in our {''} You can read more on billing through AWS in our {''}
{/*TODO(thomas): Update docs link once the new docs exist*/} {/*TODO(thomas): Update docs link once the new docs exist*/}
<Link <Link href={`${DOCS_URL}/guides/platform`} target="_blank" className="underline">
href="https://supabase.com/docs/guides/platform"
target="_blank"
className="underline"
>
Billing Docs. Billing Docs.
</Link> </Link>
</p> </p>

View File

@@ -1,5 +1,4 @@
import { zodResolver } from '@hookform/resolvers/zod' import { zodResolver } from '@hookform/resolvers/zod'
import { RadioGroupCard, RadioGroupCardItem } from '@ui/components/radio-group-card'
import { cn } from '@ui/lib/utils' import { cn } from '@ui/lib/utils'
import { Boxes, ChevronRight } from 'lucide-react' import { Boxes, ChevronRight } from 'lucide-react'
import Link from 'next/link' import Link from 'next/link'
@@ -7,6 +6,13 @@ import { useRouter } from 'next/router'
import { useMemo, useState } from 'react' import { useMemo, useState } from 'react'
import { SubmitHandler, useForm } from 'react-hook-form' import { SubmitHandler, useForm } from 'react-hook-form'
import { toast } from 'sonner' import { toast } from 'sonner'
import { z } from 'zod'
import { RadioGroupCard, RadioGroupCardItem } from '@ui/components/radio-group-card'
import { useOrganizationLinkAwsMarketplaceMutation } from 'data/organizations/organization-link-aws-marketplace-mutation'
import { useProjectsQuery } from 'data/projects/projects-query'
import { DOCS_URL } from 'lib/constants'
import { Organization } from 'types'
import { import {
Button, Button,
Collapsible_Shadcn_, Collapsible_Shadcn_,
@@ -17,10 +23,6 @@ import {
Skeleton, Skeleton,
} from 'ui' } from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { z } from 'zod'
import { useOrganizationLinkAwsMarketplaceMutation } from '../../../../data/organizations/organization-link-aws-marketplace-mutation'
import { useProjectsQuery } from '../../../../data/projects/projects-query'
import { Organization } from '../../../../types'
import { import {
ScaffoldSection, ScaffoldSection,
ScaffoldSectionContent, ScaffoldSectionContent,
@@ -139,11 +141,7 @@ const AwsMarketplaceLinkExistingOrg = ({
<p> <p>
You can read more on billing through AWS in our {''} You can read more on billing through AWS in our {''}
{/*TODO(thomas): Update docs link once the new docs exist*/} {/*TODO(thomas): Update docs link once the new docs exist*/}
<Link <Link href={`${DOCS_URL}/guides/platform`} target="_blank" className="underline">
href="https://supabase.com/docs/guides/platform"
target="_blank"
className="underline"
>
Billing Docs. Billing Docs.
</Link> </Link>
</p> </p>

View File

@@ -8,6 +8,7 @@ import { useClientSecretCreateMutation } from 'data/oauth-secrets/client-secret-
import { CreatedSecret, useClientSecretsQuery } from 'data/oauth-secrets/client-secrets-query' import { CreatedSecret, useClientSecretsQuery } from 'data/oauth-secrets/client-secrets-query'
import { OAuthApp } from 'data/oauth/oauth-apps-query' import { OAuthApp } from 'data/oauth/oauth-apps-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import { Alert_Shadcn_, AlertTitle_Shadcn_, InfoIcon } from 'ui' import { Alert_Shadcn_, AlertTitle_Shadcn_, InfoIcon } from 'ui'
import { SecretRow } from './SecretRow' import { SecretRow } from './SecretRow'
@@ -42,7 +43,9 @@ export const OAuthSecrets = ({ selectedApp }: Props) => {
<span className="text-sm text-foreground">Client secrets</span> <span className="text-sm text-foreground">Client secrets</span>
<span className="text-sm text-foreground-light"> <span className="text-sm text-foreground-light">
For handling callbacks in the OAuth 2.0 flow. Learn more{' '} For handling callbacks in the OAuth 2.0 flow. Learn more{' '}
<InlineLink href="https://supabase.com/docs/guides/integrations/build-a-supabase-integration#handling-the-callback"> <InlineLink
href={`${DOCS_URL}/guides/integrations/build-a-supabase-integration#handling-the-callback`}
>
here here
</InlineLink> </InlineLink>
. .

View File

@@ -11,6 +11,7 @@ import {
} from 'data/oauth/oauth-app-create-mutation' } from 'data/oauth/oauth-app-create-mutation'
import { useOAuthAppUpdateMutation } from 'data/oauth/oauth-app-update-mutation' import { useOAuthAppUpdateMutation } from 'data/oauth/oauth-app-update-mutation'
import type { OAuthApp } from 'data/oauth/oauth-apps-query' import type { OAuthApp } from 'data/oauth/oauth-apps-query'
import { DOCS_URL } from 'lib/constants'
import { isValidHttpUrl, uuidv4 } from 'lib/helpers' import { isValidHttpUrl, uuidv4 } from 'lib/helpers'
import { uploadAttachment } from 'lib/upload' import { uploadAttachment } from 'lib/upload'
import { import {
@@ -349,7 +350,7 @@ export const PublishAppSidePanel = ({
projects. projects.
</span> </span>
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/platform/oauth-apps/oauth-scopes" /> <DocsButton href={`${DOCS_URL}/guides/platform/oauth-apps/oauth-scopes`} />
</div> </div>
<ScopesPanel scopes={scopes} setScopes={setScopes} /> <ScopesPanel scopes={scopes} setScopes={setScopes} />

View File

@@ -12,6 +12,7 @@ import { useSSOConfigCreateMutation } from 'data/sso/sso-config-create-mutation'
import { useOrgSSOConfigQuery } from 'data/sso/sso-config-query' import { useOrgSSOConfigQuery } from 'data/sso/sso-config-query'
import { useSSOConfigUpdateMutation } from 'data/sso/sso-config-update-mutation' import { useSSOConfigUpdateMutation } from 'data/sso/sso-config-update-mutation'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -219,7 +220,7 @@ export const SSOConfig = () => {
Enable and configure SSO for your organization. Learn more about SSO{' '} Enable and configure SSO for your organization. Learn more about SSO{' '}
<InlineLink <InlineLink
className="text-foreground-lighter hover:text-foreground" className="text-foreground-lighter hover:text-foreground"
href="https://supabase.com/docs/guides/platform/sso" href={`${DOCS_URL}/guides/platform/sso`}
> >
here here
</InlineLink> </InlineLink>

View File

@@ -17,6 +17,7 @@ import { useHasAccessToProjectLevelPermissions } from 'data/subscriptions/org-su
import { doPermissionsCheck, useGetPermissions } from 'hooks/misc/useCheckPermissions' import { doPermissionsCheck, useGetPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { useProfile } from 'lib/profile' import { useProfile } from 'lib/profile'
import { import {
Button, Button,
@@ -300,7 +301,7 @@ export const InviteMemberButton = () => {
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Button asChild type="default"> <Button asChild type="default">
<Link <Link
href="https://supabase.com/docs/guides/platform/sso" href={`${DOCS_URL}/guides/platform/sso`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -5,22 +5,23 @@ import AlertError from 'components/ui/AlertError'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useOrganizationRolesV2Query } from 'data/organization-members/organization-roles-query' import { useOrganizationRolesV2Query } from 'data/organization-members/organization-roles-query'
import { useOrganizationMembersQuery } from 'data/organizations/organization-members-query' import { useOrganizationMembersQuery } from 'data/organizations/organization-members-query'
import { DOCS_URL } from 'lib/constants'
import { useProfile } from 'lib/profile' import { useProfile } from 'lib/profile'
import { partition } from 'lodash' import { partition } from 'lodash'
import { useMemo } from 'react' import { useMemo } from 'react'
import { import {
Button, Button,
Card,
Loading, Loading,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipTrigger, TooltipTrigger,
Table,
TableHeader,
TableHead,
TableBody,
TableCell,
TableRow,
Card,
} from 'ui' } from 'ui'
import { Admonition } from 'ui-patterns' import { Admonition } from 'ui-patterns'
import { MemberRow } from './MemberRow' import { MemberRow } from './MemberRow'
@@ -108,7 +109,7 @@ const MembersView = ({ searchString }: MembersViewProps) => {
<a <a
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
href="https://supabase.com/docs/guides/platform/access-control" href={`${DOCS_URL}/guides/platform/access-control`}
> >
<HelpCircle size={14} className="text-foreground-light" /> <HelpCircle size={14} className="text-foreground-light" />
</a> </a>

View File

@@ -10,6 +10,7 @@ import {
ScaffoldTitle, ScaffoldTitle,
} from 'components/layouts/Scaffold' } from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { Input } from 'ui-patterns/DataInputs/Input' import { Input } from 'ui-patterns/DataInputs/Input'
import { InviteMemberButton } from './InviteMemberButton' import { InviteMemberButton } from './InviteMemberButton'
import MembersView from './MembersView' import MembersView from './MembersView'
@@ -33,7 +34,7 @@ export const TeamSettings = () => {
placeholder="Filter members" placeholder="Filter members"
/> />
<ScaffoldActionsGroup className="w-full md:w-auto"> <ScaffoldActionsGroup className="w-full md:w-auto">
<DocsButton href="https://supabase.com/docs/guides/platform/access-control" /> <DocsButton href={`${DOCS_URL}/guides/platform/access-control`} />
<InviteMemberButton /> <InviteMemberButton />
</ScaffoldActionsGroup> </ScaffoldActionsGroup>
</ScaffoldActionsContainer> </ScaffoldActionsContainer>

View File

@@ -11,6 +11,7 @@ import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useProjectsQuery } from 'data/projects/projects-query' import { useProjectsQuery } from 'data/projects/projects-query'
import { useHasAccessToProjectLevelPermissions } from 'data/subscriptions/org-subscription-query' import { useHasAccessToProjectLevelPermissions } from 'data/subscriptions/org-subscription-query'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -186,7 +187,7 @@ export const UpdateRolesPanel = ({ visible, member, onClose }: UpdateRolesPanelP
<p className="truncate" title={`Manage access for ${member.username}`}> <p className="truncate" title={`Manage access for ${member.username}`}>
Manage access for {member.username} Manage access for {member.username}
</p> </p>
<DocsButton href="https://supabase.com/docs/guides/platform/access-control" /> <DocsButton href={`${DOCS_URL}/guides/platform/access-control`} />
</SheetHeader> </SheetHeader>
<SheetSection className="h-full overflow-auto flex flex-col gap-y-4"> <SheetSection className="h-full overflow-auto flex flex-col gap-y-4">

View File

@@ -9,6 +9,7 @@ import { useOrgDailyComputeStatsQuery } from 'data/analytics/org-daily-compute-s
import { ComputeUsageMetric, computeUsageMetricLabel } from 'data/analytics/org-daily-stats-query' import { ComputeUsageMetric, computeUsageMetricLabel } from 'data/analytics/org-daily-stats-query'
import type { OrgSubscription } from 'data/subscriptions/types' import type { OrgSubscription } from 'data/subscriptions/types'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
import { SectionContent } from './SectionContent' import { SectionContent } from './SectionContent'
import { Attribute, AttributeColor } from './Usage.constants' import { Attribute, AttributeColor } from './Usage.constants'
import UsageBarChart from './UsageBarChart' import UsageBarChart from './UsageBarChart'
@@ -86,11 +87,11 @@ const Compute = ({ orgSlug, projectRef, startDate, endDate }: ComputeProps) => {
? [ ? [
{ {
name: 'Compute Add-ons', name: 'Compute Add-ons',
url: 'https://supabase.com/docs/guides/platform/compute-add-ons', url: `${DOCS_URL}/guides/platform/compute-add-ons`,
}, },
{ {
name: 'Usage-billing for Compute', name: 'Usage-billing for Compute',
url: 'https://supabase.com/docs/guides/platform/manage-your-usage/compute', url: `${DOCS_URL}/guides/platform/manage-your-usage/compute`,
}, },
] ]
: [], : [],

View File

@@ -11,6 +11,7 @@ import {
import type { OrgSubscription } from 'data/subscriptions/types' import type { OrgSubscription } from 'data/subscriptions/types'
import { useOrgUsageQuery } from 'data/usage/org-usage-query' import { useOrgUsageQuery } from 'data/usage/org-usage-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
import { cn } from 'ui' import { cn } from 'ui'
import { BILLING_BREAKDOWN_METRICS } from '../BillingSettings/BillingBreakdown/BillingBreakdown.constants' import { BILLING_BREAKDOWN_METRICS } from '../BillingSettings/BillingBreakdown/BillingBreakdown.constants'
import { BillingMetric } from '../BillingSettings/BillingBreakdown/BillingMetric' import { BillingMetric } from '../BillingSettings/BillingBreakdown/BillingMetric'
@@ -125,7 +126,7 @@ export const TotalUsage = ({
? [ ? [
{ {
name: 'How billing works', name: 'How billing works',
url: 'https://supabase.com/docs/guides/platform/billing-on-supabase', url: `${DOCS_URL}/guides/platform/billing-on-supabase`,
}, },
{ {
name: 'Supabase Plans', name: 'Supabase Plans',

View File

@@ -2,6 +2,7 @@ import { USAGE_APPROACHING_THRESHOLD } from 'components/interfaces/Billing/Billi
import { EgressType, PricingMetric } from 'data/analytics/org-daily-stats-query' import { EgressType, PricingMetric } from 'data/analytics/org-daily-stats-query'
import type { OrgSubscription } from 'data/subscriptions/types' import type { OrgSubscription } from 'data/subscriptions/types'
import type { OrgUsageResponse } from 'data/usage/org-usage-query' import type { OrgUsageResponse } from 'data/usage/org-usage-query'
import { DOCS_URL } from 'lib/constants'
import { Admonition } from 'ui-patterns' import { Admonition } from 'ui-patterns'
export const COLOR_MAP = { export const COLOR_MAP = {
@@ -97,7 +98,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Documentation', name: 'Documentation',
url: 'https://supabase.com/docs/guides/platform/manage-your-usage/egress', url: `${DOCS_URL}/guides/platform/manage-your-usage/egress`,
}, },
], ],
}, },
@@ -116,7 +117,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Documentation', name: 'Documentation',
url: 'https://supabase.com/docs/guides/platform/manage-your-usage/egress', url: `${DOCS_URL}/guides/platform/manage-your-usage/egress`,
}, },
], ],
}) })
@@ -147,7 +148,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Documentation', name: 'Documentation',
url: 'https://supabase.com/docs/guides/platform/database-size', url: `${DOCS_URL}/guides/platform/database-size`,
}, },
], ],
chartDescription: 'The data refreshes every 24 hours.', chartDescription: 'The data refreshes every 24 hours.',
@@ -205,11 +206,11 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Documentation', name: 'Documentation',
url: 'https://supabase.com/docs/guides/platform/manage-your-usage/disk-size', url: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`,
}, },
{ {
name: 'Disk Management', name: 'Disk Management',
url: 'https://supabase.com/docs/guides/platform/database-size#disk-management', url: `${DOCS_URL}/guides/platform/database-size#disk-management`,
}, },
], ],
chartDescription: '', chartDescription: '',
@@ -227,7 +228,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Storage', name: 'Storage',
url: 'https://supabase.com/docs/guides/storage', url: `${DOCS_URL}/guides/storage`,
}, },
], ],
}, },
@@ -253,7 +254,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Auth', name: 'Auth',
url: 'https://supabase.com/docs/guides/auth', url: `${DOCS_URL}/guides/auth`,
}, },
], ],
}, },
@@ -274,7 +275,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'SSO with SAML 2.0', name: 'SSO with SAML 2.0',
url: 'https://supabase.com/docs/guides/auth/sso/auth-sso-saml', url: `${DOCS_URL}/guides/auth/sso/auth-sso-saml`,
}, },
], ],
}, },
@@ -295,7 +296,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Documentation', name: 'Documentation',
url: 'https://supabase.com/docs/guides/storage/image-transformations', url: `${DOCS_URL}/guides/storage/image-transformations`,
}, },
], ],
}, },
@@ -311,7 +312,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Edge Functions', name: 'Edge Functions',
url: 'https://supabase.com/docs/guides/functions', url: `${DOCS_URL}/guides/functions`,
}, },
], ],
}, },
@@ -327,7 +328,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Realtime Quotas', name: 'Realtime Quotas',
url: 'https://supabase.com/docs/guides/realtime/quotas', url: `${DOCS_URL}/guides/realtime/quotas`,
}, },
], ],
}, },
@@ -346,7 +347,7 @@ export const USAGE_CATEGORIES: (subscription?: OrgSubscription) => CategoryMeta[
links: [ links: [
{ {
name: 'Realtime Quotas', name: 'Realtime Quotas',
url: 'https://supabase.com/docs/guides/realtime/quotas', url: `${DOCS_URL}/guides/realtime/quotas`,
}, },
], ],
}, },

View File

@@ -1,3 +1,4 @@
import { Download } from 'lucide-react'
import { useState } from 'react' import { useState } from 'react'
import { toast } from 'sonner' import { toast } from 'sonner'
@@ -5,7 +6,7 @@ import { useParams } from 'common'
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-config-query' import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-config-query'
import { generateTypes } from 'data/projects/project-type-generation-query' import { generateTypes } from 'data/projects/project-type-generation-query'
import { Download } from 'lucide-react' import { DOCS_URL } from 'lib/constants'
import { Button } from 'ui' import { Button } from 'ui'
import ContentSnippet from '../ContentSnippet' import ContentSnippet from '../ContentSnippet'
import { DOCS_CONTENT } from '../ProjectAPIDocs.constants' import { DOCS_CONTENT } from '../ProjectAPIDocs.constants'
@@ -42,7 +43,7 @@ const Entities = ({ language }: ContentProps) => {
<div> <div>
<ContentSnippet selectedLanguage={language} snippet={DOCS_CONTENT.generatingTypes} /> <ContentSnippet selectedLanguage={language} snippet={DOCS_CONTENT.generatingTypes} />
<div className="flex items-center gap-x-2 px-4 mt-3"> <div className="flex items-center gap-x-2 px-4 mt-3">
<DocsButton href="https://supabase.com/docs/guides/database/api/generating-types" /> <DocsButton href={`${DOCS_URL}/guides/database/api/generating-types`} />
<Button <Button
type="default" type="default"
disabled={isGeneratingTypes} disabled={isGeneratingTypes}

View File

@@ -7,7 +7,7 @@ import { useEdgeFunctionsQuery } from 'data/edge-functions/edge-functions-query'
import { useOpenAPISpecQuery } from 'data/open-api/api-spec-query' import { useOpenAPISpecQuery } from 'data/open-api/api-spec-query'
import { useBucketsQuery } from 'data/storage/buckets-query' import { useBucketsQuery } from 'data/storage/buckets-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { Book, BookOpen } from 'lucide-react' import { Book, BookOpen } from 'lucide-react'
import { useAppStateSnapshot } from 'state/app-state' import { useAppStateSnapshot } from 'state/app-state'
import { Button } from 'ui' import { Button } from 'ui'
@@ -171,7 +171,7 @@ const FirstLevelNav = () => {
</Button> </Button>
<Button block asChild type="text" size="small" icon={<BookOpen />}> <Button block asChild type="text" size="small" icon={<BookOpen />}>
<Link <Link
href="https://supabase.com/docs/guides/graphql" href={`${DOCS_URL}/guides/graphql`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="!justify-start" className="!justify-start"
@@ -183,18 +183,13 @@ const FirstLevelNav = () => {
<div className="px-2 py-4"> <div className="px-2 py-4">
<Button block asChild type="text" size="small" icon={<Book />}> <Button block asChild type="text" size="small" icon={<Book />}>
<Link <Link href={`${DOCS_URL}`} target="_blank" rel="noreferrer" className="!justify-start">
href="https://supabase.com/docs"
target="_blank"
rel="noreferrer"
className="!justify-start"
>
Documentation Documentation
</Link> </Link>
</Button> </Button>
<Button block asChild type="text" size="small" icon={<BookOpen />}> <Button block asChild type="text" size="small" icon={<BookOpen />}>
<Link <Link
href="https://supabase.com/docs/guides/api" href={`${DOCS_URL}/guides/api`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="!justify-start" className="!justify-start"

View File

@@ -1,3 +1,5 @@
import { DOCS_URL } from 'lib/constants'
export const DOCS_MENU = [ export const DOCS_MENU = [
{ name: 'Connect', key: 'introduction' }, { name: 'Connect', key: 'introduction' },
{ name: 'User Management', key: 'user-management' }, { name: 'User Management', key: 'user-management' },
@@ -345,11 +347,11 @@ Edge Functions are server-side TypeScript functions, distributed globally at the
description: ` description: `
Follow the steps to prepare your Supabase project on your local machine. Follow the steps to prepare your Supabase project on your local machine.
- Install the Supabase [CLI](https://supabase.com/docs/guides/cli). - Install the Supabase [CLI](${DOCS_URL}/guides/cli).
- [Login to the CLI](https://supabase.com/docs/reference/cli/usage#supabase-login) using the command: \`supabase login\`.. - [Login to the CLI](${DOCS_URL}/reference/cli/usage#supabase-login) using the command: \`supabase login\`..
- [Initialize Supabase](https://supabase.com/docs/guides/getting-started/local-development#getting-started) inside your project using the command: \`supabase init\`.. - [Initialize Supabase](${DOCS_URL}/guides/getting-started/local-development#getting-started) inside your project using the command: \`supabase init\`..
- [Link to your Remote Project](https://supabase.com/docs/reference/cli/usage#supabase-link) using the command \`supabase link --project-ref [ref]\`.. - [Link to your Remote Project](${DOCS_URL}/reference/cli/usage#supabase-link) using the command \`supabase link --project-ref [ref]\`..
- Setup your environment: Follow the steps [here](https://supabase.com/docs/guides/functions/quickstart#setting-up-your-environment). - Setup your environment: Follow the steps [here](${DOCS_URL}/guides/functions/quickstart#setting-up-your-environment).
`, `,
js: undefined, js: undefined,
bash: undefined, bash: undefined,
@@ -397,7 +399,7 @@ If you don't want to expose tables in your API, simply add them to a different s
description: ` description: `
Supabase APIs are generated from your database, which means that we can use database introspection to generate type-safe API definitions. Supabase APIs are generated from your database, which means that we can use database introspection to generate type-safe API definitions.
You can generate types from your database either through the [Supabase CLI](https://supabase.com/docs/guides/database/api/generating-types), or by downloading the types file via the button on the right and importing it in your application within \`src/index.ts\`. You can generate types from your database either through the [Supabase CLI](${DOCS_URL}/guides/database/api/generating-types), or by downloading the types file via the button on the right and importing it in your application within \`src/index.ts\`.
`, `,
js: undefined, js: undefined,
bash: undefined, bash: undefined,
@@ -480,9 +482,9 @@ The API endpoint supports POST (and in some cases GET) to execute the function.
description: ` description: `
Supabase provides a globally distributed cluster of Realtime servers that enable the following functionality: Supabase provides a globally distributed cluster of Realtime servers that enable the following functionality:
- [Broadcast](https://supabase.com/docs/guides/realtime/broadcast): Send ephemeral messages from client to clients with low latency. - [Broadcast](${DOCS_URL}/guides/realtime/broadcast): Send ephemeral messages from client to clients with low latency.
- [Presence](https://supabase.com/docs/guides/realtime/presence): Track and synchronize shared state between clients. - [Presence](${DOCS_URL}/guides/realtime/presence): Track and synchronize shared state between clients.
- [Postgres Changes](https://supabase.com/docs/guides/realtime/postgres-changes): Listen to Postgres database changes and send them to authorized clients. - [Postgres Changes](${DOCS_URL}/guides/realtime/postgres-changes): Listen to Postgres database changes and send them to authorized clients.
`, `,
js: undefined, js: undefined,
bash: undefined, bash: undefined,
@@ -495,7 +497,7 @@ Supabase provides a globally distributed cluster of Realtime servers that enable
Creates an event handler that listens to changes. Creates an event handler that listens to changes.
- By default, Broadcast and Presence are enabled for all projects. - By default, Broadcast and Presence are enabled for all projects.
- By default, listening to database changes is disabled for new projects due to database performance and security concerns. You can turn it on by managing Realtime's [replication](https://supabase.com/docs/guides/api#realtime-api-overview). - By default, listening to database changes is disabled for new projects due to database performance and security concerns. You can turn it on by managing Realtime's [replication](${DOCS_URL}/guides/api#realtime-api-overview).
- You can receive the "previous" data for updates and deletes by setting the table's \`REPLICA IDENTITY\` to \`FULL\` (e.g., \`ALTER TABLE your_table REPLICA IDENTITY FULL;\`). - You can receive the "previous" data for updates and deletes by setting the table's \`REPLICA IDENTITY\` to \`FULL\` (e.g., \`ALTER TABLE your_table REPLICA IDENTITY FULL;\`).
- Row level security is not applied to delete statements. When RLS is enabled and replica identity is set to full, only the primary key is sent to clients. - Row level security is not applied to delete statements. When RLS is enabled and replica identity is set to full, only the primary key is sent to clients.
`, `,
@@ -568,7 +570,7 @@ export const DOCS_RESOURCE_CONTENT: {
title: 'Invoke function', title: 'Invoke function',
category: 'stored-procedures', category: 'stored-procedures',
description: undefined, description: undefined,
docsUrl: 'https://supabase.com/docs/reference/javascript/rpc', docsUrl: `${DOCS_URL}/reference/javascript/rpc`,
code: ({ code: ({
rpcName, rpcName,
rpcParams, rpcParams,
@@ -624,7 +626,7 @@ else console.log(data)
key: 'read-rows', key: 'read-rows',
title: `Read rows`, title: `Read rows`,
category: 'entities', category: 'entities',
docsUrl: 'https://supabase.com/docs/reference/javascript/select', docsUrl: `${DOCS_URL}/reference/javascript/select`,
description: `To read rows in this table, use the \`select\` method.`, description: `To read rows in this table, use the \`select\` method.`,
code: ({ code: ({
resourceId, resourceId,
@@ -707,7 +709,7 @@ let { data: ${resourceId}, error } = await supabase
category: 'entities', category: 'entities',
title: 'Filtering', title: 'Filtering',
description: `Supabase provides a wide range of filters`, description: `Supabase provides a wide range of filters`,
docsUrl: 'https://supabase.com/docs/reference/javascript/using-filters', docsUrl: `${DOCS_URL}/reference/javascript/using-filters`,
code: ({ code: ({
resourceId, resourceId,
endpoint, endpoint,
@@ -786,7 +788,7 @@ let { data: ${resourceId}, error } = await supabase
\`insert\` will also return the replaced values for UPSERT. \`insert\` will also return the replaced values for UPSERT.
`, `,
docsUrl: 'https://supabase.com/docs/reference/javascript/insert', docsUrl: `${DOCS_URL}/reference/javascript/insert`,
code: ({ code: ({
resourceId, resourceId,
endpoint, endpoint,
@@ -867,7 +869,7 @@ const { data, error } = await supabase
\`update\` will also return the replaced values for UPDATE. \`update\` will also return the replaced values for UPDATE.
`, `,
docsUrl: 'https://supabase.com/docs/reference/javascript/update', docsUrl: `${DOCS_URL}/reference/javascript/update`,
code: ({ code: ({
resourceId, resourceId,
endpoint, endpoint,
@@ -907,7 +909,7 @@ const { data, error } = await supabase
description: ` description: `
\`delete\` lets you delete rows. \`delete\` will match all rows by default, so remember to specify your filters! \`delete\` lets you delete rows. \`delete\` will match all rows by default, so remember to specify your filters!
`, `,
docsUrl: 'https://supabase.com/docs/reference/javascript/delete', docsUrl: `${DOCS_URL}/reference/javascript/delete`,
code: ({ code: ({
resourceId, resourceId,
endpoint, endpoint,
@@ -943,7 +945,7 @@ const { error } = await supabase
description: ` description: `
Supabase provides realtime functionality and broadcasts database changes to authorized users depending on Row Level Security (RLS) policies. Supabase provides realtime functionality and broadcasts database changes to authorized users depending on Row Level Security (RLS) policies.
`, `,
docsUrl: 'https://supabase.com/docs/reference/javascript/subscribe', docsUrl: `${DOCS_URL}/reference/javascript/subscribe`,
code: ({ resourceId }: { resourceId: string }) => { code: ({ resourceId }: { resourceId: string }) => {
return [ return [
{ {
@@ -1028,7 +1030,7 @@ const channels = supabase.channel('custom-filter-channel')
key: 'upload-file', key: 'upload-file',
category: 'storage', category: 'storage',
title: 'Upload a file', title: 'Upload a file',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-upload', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-upload`,
description: ` description: `
Upload a file to an existing bucket. RLS policy permissions required: Upload a file to an existing bucket. RLS policy permissions required:
- \`buckets\` table permissions: none - \`buckets\` table permissions: none
@@ -1064,7 +1066,7 @@ const { data, error } = await supabase
key: 'delete-files', key: 'delete-files',
category: 'storage', category: 'storage',
title: 'Delete files', title: 'Delete files',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-remove', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-remove`,
description: ` description: `
Delete files within the bucket. RLS policy permissions required: Delete files within the bucket. RLS policy permissions required:
- \`buckets\` table permissions: none - \`buckets\` table permissions: none
@@ -1093,7 +1095,7 @@ const { data, error } = await supabase
key: 'list-files', key: 'list-files',
category: 'storage', category: 'storage',
title: 'List all files', title: 'List all files',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-list', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-list`,
description: ` description: `
List all files within the bucket. RLS policy permissions required: List all files within the bucket. RLS policy permissions required:
- \`buckets\` table permissions: none - \`buckets\` table permissions: none
@@ -1125,7 +1127,7 @@ const { data, error } = await supabase
key: 'download-file', key: 'download-file',
category: 'storage', category: 'storage',
title: 'Download a file', title: 'Download a file',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-download', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-download`,
description: ` description: `
Downloads a file from a private bucket. For public buckets, make a request to the URL returned from getPublicUrl instead. RLS policy permissions required: Downloads a file from a private bucket. For public buckets, make a request to the URL returned from getPublicUrl instead. RLS policy permissions required:
- \`buckets\` table permissions: none - \`buckets\` table permissions: none
@@ -1154,7 +1156,7 @@ const { data, error } = await supabase
key: 'create-signed-url', key: 'create-signed-url',
category: 'storage', category: 'storage',
title: 'Create a signed URL', title: 'Create a signed URL',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-createsignedurl', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-createsignedurl`,
description: ` description: `
Create a signed URL which can be used to share a file for a fixed amount of time. RLS policy permissions required: Create a signed URL which can be used to share a file for a fixed amount of time. RLS policy permissions required:
- \`buckets\` table permissions: none - \`buckets\` table permissions: none
@@ -1183,7 +1185,7 @@ const { data, error } = await supabase
key: 'retrieve-public-url', key: 'retrieve-public-url',
category: 'storage', category: 'storage',
title: 'Retrieve public URL', title: 'Retrieve public URL',
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-from-getpublicurl', docsUrl: `${DOCS_URL}/reference/javascript/storage-from-getpublicurl`,
description: ` description: `
A simple convenience function to get the URL for an asset in a public bucket. If you do not want to use this function, you can construct the public URL by concatenating the bucket URL with the path to the asset. A simple convenience function to get the URL for an asset in a public bucket. If you do not want to use this function, you can construct the public URL by concatenating the bucket URL with the path to the asset.
@@ -1216,7 +1218,7 @@ const { data } = supabase
key: 'invoke-edge-function', key: 'invoke-edge-function',
category: 'edge-functions', category: 'edge-functions',
title: 'Invoke an edge function', title: 'Invoke an edge function',
docsUrl: 'https://supabase.com/docs/reference/javascript/functions-invoke', docsUrl: `${DOCS_URL}/reference/javascript/functions-invoke`,
description: ` description: `
Invokes a Supabase Edge Function. Requires an Authorization header, and invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec. Invokes a Supabase Edge Function. Requires an Authorization header, and invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec.

View File

@@ -1,6 +1,13 @@
import { useParams } from 'common' import { useParams } from 'common'
import Link from 'next/link'
import { useState } from 'react' import { useState } from 'react'
import { DocsButton } from 'components/ui/DocsButton'
import { useEdgeFunctionsQuery } from 'data/edge-functions/edge-functions-query'
import { useOpenAPISpecQuery } from 'data/open-api/api-spec-query'
import { useBucketsQuery } from 'data/storage/buckets-query'
import { DOCS_URL } from 'lib/constants'
import { ChevronLeft, Code } from 'lucide-react'
import { useAppStateSnapshot } from 'state/app-state'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -14,16 +21,9 @@ import {
PopoverTrigger_Shadcn_, PopoverTrigger_Shadcn_,
Popover_Shadcn_, Popover_Shadcn_,
} from 'ui' } from 'ui'
import { useEdgeFunctionsQuery } from 'data/edge-functions/edge-functions-query'
import { useOpenAPISpecQuery } from 'data/open-api/api-spec-query'
import { useBucketsQuery } from 'data/storage/buckets-query'
import { useAppStateSnapshot } from 'state/app-state'
import { useIsAPIDocsSidePanelEnabled } from '../App/FeaturePreview/FeaturePreviewContext' import { useIsAPIDocsSidePanelEnabled } from '../App/FeaturePreview/FeaturePreviewContext'
import { navigateToSection } from './Content/Content.utils' import { navigateToSection } from './Content/Content.utils'
import { DOCS_RESOURCE_CONTENT } from './ProjectAPIDocs.constants' import { DOCS_RESOURCE_CONTENT } from './ProjectAPIDocs.constants'
import { ChevronLeft, Code, ExternalLink } from 'lucide-react'
import { DocsButton } from 'components/ui/DocsButton'
const SecondLevelNav = () => { const SecondLevelNav = () => {
const { ref } = useParams() const { ref } = useParams()
@@ -44,22 +44,22 @@ const SecondLevelNav = () => {
entities: { entities: {
title: 'Tables & Views', title: 'Tables & Views',
options: tables, options: tables,
docsUrl: 'https://supabase.com/docs/reference/javascript/select', docsUrl: `${DOCS_URL}/reference/javascript/select`,
}, },
'stored-procedures': { 'stored-procedures': {
title: 'Stored Procedures', title: 'Stored Procedures',
options: functions, options: functions,
docsUrl: 'https://supabase.com/docs/reference/javascript/rpc', docsUrl: `${DOCS_URL}/reference/javascript/rpc`,
}, },
storage: { storage: {
title: 'Storage', title: 'Storage',
options: buckets ?? [], options: buckets ?? [],
docsUrl: 'https://supabase.com/docs/reference/javascript/storage-createbucket', docsUrl: `${DOCS_URL}/reference/javascript/storage-createbucket`,
}, },
'edge-functions': { 'edge-functions': {
title: 'Edge Functions', title: 'Edge Functions',
options: edgeFunctions ?? [], options: edgeFunctions ?? [],
docsUrl: 'https://supabase.com/docs/reference/javascript/functions-invoke', docsUrl: `${DOCS_URL}/reference/javascript/functions-invoke`,
}, },
} }

View File

@@ -1,7 +1,9 @@
import { ChevronRight } from 'lucide-react' import { ChevronRight } from 'lucide-react'
import { UseFormReturn } from 'react-hook-form' import { UseFormReturn } from 'react-hook-form'
import { DocsButton } from 'components/ui/DocsButton'
import Panel from 'components/ui/Panel' import Panel from 'components/ui/Panel'
import { DOCS_URL } from 'lib/constants'
import { CreateProjectForm } from 'pages/new/[slug]' import { CreateProjectForm } from 'pages/new/[slug]'
import { import {
Badge, Badge,
@@ -17,7 +19,6 @@ import {
} from 'ui' } from 'ui'
import { Admonition } from 'ui-patterns' import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { DocsButton } from 'components/ui/DocsButton'
interface AdvancedConfigurationProps { interface AdvancedConfigurationProps {
form: UseFormReturn<CreateProjectForm> form: UseFormReturn<CreateProjectForm>
@@ -97,10 +98,7 @@ export const AdvancedConfiguration = ({
title="OrioleDB is not production ready" title="OrioleDB is not production ready"
description="Postgres with OrioleDB extension is currently in Public Alpha and not recommended for production usage yet." description="Postgres with OrioleDB extension is currently in Public Alpha and not recommended for production usage yet."
> >
<DocsButton <DocsButton className="mt-2" href={`${DOCS_URL}/guides/database/orioledb`} />
className="mt-2"
href="https://supabase.com/docs/guides/database/orioledb"
/>
</Admonition> </Admonition>
)} )}
</FormItemLayout> </FormItemLayout>

View File

@@ -1,10 +1,11 @@
import { InlineLink } from 'components/ui/InlineLink' import { InlineLink } from 'components/ui/InlineLink'
import { DOCS_URL } from 'lib/constants'
export const SpecialSymbolsCallout = () => { export const SpecialSymbolsCallout = () => {
return ( return (
<p className="mb-2"> <p className="mb-2">
Note: If using the Postgres connection string, you will need to{' '} Note: If using the Postgres connection string, you will need to{' '}
<InlineLink href="https://supabase.com/docs/guides/database/postgres/roles#special-symbols-in-passwords"> <InlineLink href={`${DOCS_URL}/guides/database/postgres/roles#special-symbols-in-passwords`}>
percent-encode percent-encode
</InlineLink>{' '} </InlineLink>{' '}
the password the password

View File

@@ -6,6 +6,7 @@ import { DocsButton } from 'components/ui/DocsButton'
import { useDatabaseExtensionEnableMutation } from 'data/database-extensions/database-extension-enable-mutation' import { useDatabaseExtensionEnableMutation } from 'data/database-extensions/database-extension-enable-mutation'
import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query' import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui'
import { Markdown } from '../Markdown' import { Markdown } from '../Markdown'
import { getIndexAdvisorExtensions } from './index-advisor.utils' import { getIndexAdvisorExtensions } from './index-advisor.utils'
@@ -88,7 +89,7 @@ export const IndexAdvisorDisabledState = () => {
Enable extensions Enable extensions
</Button> </Button>
)} )}
<DocsButton href="https://supabase.com/docs/guides/database/extensions/index_advisor" /> <DocsButton href={`${DOCS_URL}/guides/database/extensions/index_advisor`} />
</div> </div>
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>
</Alert_Shadcn_> </Alert_Shadcn_>

View File

@@ -9,15 +9,15 @@ import { executeSql } from 'data/sql/execute-sql-query'
import { DbQueryHook } from 'hooks/analytics/useDbQuery' import { DbQueryHook } from 'hooks/analytics/useDbQuery'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { IS_PLATFORM } from 'lib/constants' import { DOCS_URL, IS_PLATFORM } from 'lib/constants'
import { useDatabaseSelectorStateSnapshot } from 'state/database-selector' import { useDatabaseSelectorStateSnapshot } from 'state/database-selector'
import { Button, LoadingLine, cn } from 'ui' import { Button, LoadingLine, cn } from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { Markdown } from '../Markdown' import { Markdown } from '../Markdown'
import { PresetHookResult } from '../Reports/Reports.utils' import { PresetHookResult } from '../Reports/Reports.utils'
import { QueryPerformanceMetrics } from './QueryPerformanceMetrics'
import { QueryPerformanceFilterBar } from './QueryPerformanceFilterBar' import { QueryPerformanceFilterBar } from './QueryPerformanceFilterBar'
import { QueryPerformanceGrid } from './QueryPerformanceGrid' import { QueryPerformanceGrid } from './QueryPerformanceGrid'
import { QueryPerformanceMetrics } from './QueryPerformanceMetrics'
interface QueryPerformanceProps { interface QueryPerformanceProps {
queryHitRate: PresetHookResult queryHitRate: PresetHookResult
@@ -100,7 +100,7 @@ export const QueryPerformance = ({
<p>How is this report generated?</p> <p>How is this report generated?</p>
<Markdown <Markdown
className="text-xs" className="text-xs"
content="This report uses the pg_stat_statements table, and pg_stat_statements extension. [Learn more here](https://supabase.com/docs/guides/platform/performance#examining-query-performance)." content={`This report uses the pg_stat_statements table, and pg_stat_statements extension. [Learn more here](${DOCS_URL}/guides/platform/performance#examining-query-performance).`}
/> />
</div> </div>
@@ -108,8 +108,8 @@ export const QueryPerformance = ({
<p>Inspect your database for potential issues</p> <p>Inspect your database for potential issues</p>
<Markdown <Markdown
className="text-xs" className="text-xs"
content="The Supabase CLI comes with a range of tools to help inspect your Postgres instances for content={`The Supabase CLI comes with a range of tools to help inspect your Postgres instances for
potential issues. [Learn more here](https://supabase.com/docs/guides/database/inspect)." potential issues. [Learn more here](${DOCS_URL}/guides/database/inspect).`}
/> />
</div> </div>
</div> </div>

View File

@@ -9,6 +9,7 @@ import { DocsButton } from 'components/ui/DocsButton'
import { getTemporaryAPIKey } from 'data/api-keys/temp-api-keys-query' import { getTemporaryAPIKey } from 'data/api-keys/temp-api-keys-query'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { import {
Button, Button,
FormControl_Shadcn_, FormControl_Shadcn_,
@@ -135,7 +136,7 @@ export const ChooseChannelPopover = ({ config, onChangeConfig }: ChooseChannelPo
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="underline hover:text-foreground transition" className="underline hover:text-foreground transition"
href="https://supabase.com/docs/guides/realtime/concepts#channels" href={`${DOCS_URL}/guides/realtime/concepts#channels`}
> >
our docs our docs
</a> </a>
@@ -173,7 +174,7 @@ export const ChooseChannelPopover = ({ config, onChangeConfig }: ChooseChannelPo
<DocsButton <DocsButton
abbrev={false} abbrev={false}
className="w-min" className="w-min"
href="https://supabase.com/docs/guides/realtime/authorization" href={`${DOCS_URL}/guides/realtime/authorization`}
/> />
</form> </form>
</Form_Shadcn_> </Form_Shadcn_>

View File

@@ -12,6 +12,7 @@ import ShimmerLine from 'components/ui/ShimmerLine'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { Button, IconBroadcast, IconDatabaseChanges, IconPresence, cn } from 'ui' import { Button, IconBroadcast, IconDatabaseChanges, IconPresence, cn } from 'ui'
import { GenericSkeletonLoader } from 'ui-patterns' import { GenericSkeletonLoader } from 'ui-patterns'
import MessageSelection from './MessageSelection' import MessageSelection from './MessageSelection'
@@ -98,7 +99,7 @@ const NoResultAlert = ({
<p className="text-foreground">Not sure what to do?</p> <p className="text-foreground">Not sure what to do?</p>
<p className="text-foreground-lighter text-xs">Browse our documentation</p> <p className="text-foreground-lighter text-xs">Browse our documentation</p>
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/realtime" /> <DocsButton href={`${DOCS_URL}/guides/realtime`} />
</div> </div>
</div> </div>
</> </>

View File

@@ -1,4 +1,5 @@
import { DocsButton } from 'components/ui/DocsButton' import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { cn } from 'ui' import { cn } from 'ui'
const NoChannelEmptyState = () => { const NoChannelEmptyState = () => {
@@ -18,7 +19,7 @@ const NoChannelEmptyState = () => {
<p className="text-foreground">Not sure what to do?</p> <p className="text-foreground">Not sure what to do?</p>
<p className="text-foreground-lighter text-xs">Browse our documentation</p> <p className="text-foreground-lighter text-xs">Browse our documentation</p>
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/realtime" /> <DocsButton href={`${DOCS_URL}/guides/realtime`} />
</div> </div>
</div> </div>
) )

View File

@@ -5,6 +5,7 @@ import { Dispatch, SetStateAction, useState } from 'react'
import { useParams } from 'common' import { useParams } from 'common'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { import {
Badge, Badge,
Button, Button,
@@ -180,7 +181,7 @@ export const RealtimeFilterPopover = ({ config, onChangeConfig }: RealtimeFilter
className="underline" className="underline"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
href="https://supabase.com/docs/guides/realtime/postgres-changes#available-filters" href={`${DOCS_URL}/guides/realtime/postgres-changes#available-filters`}
> >
our docs our docs
</Link> </Link>

View File

@@ -10,6 +10,7 @@ import { User, useUsersInfiniteQuery } from 'data/auth/users-infinite-query'
import { useCustomAccessTokenHookDetails } from 'hooks/misc/useCustomAccessTokenHookDetails' import { useCustomAccessTokenHookDetails } from 'hooks/misc/useCustomAccessTokenHookDetails'
import { useLocalStorage } from 'hooks/misc/useLocalStorage' import { useLocalStorage } from 'hooks/misc/useLocalStorage'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state' import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state'
import { ResponseError } from 'types' import { ResponseError } from 'types'
import { import {
@@ -393,10 +394,7 @@ const UserImpersonationSelector = () => {
AAL1 verifies users via standard login methods, while AAL2 adds a second AAL1 verifies users via standard login methods, while AAL2 adds a second
authentication factor. If you're not using MFA, you can leave this on AAL1. authentication factor. If you're not using MFA, you can leave this on AAL1.
Learn more about MFA{' '} Learn more about MFA{' '}
<InlineLink href="https://supabase.com/docs/guides/auth/auth-mfa"> <InlineLink href={`${DOCS_URL}/guides/auth/auth-mfa`}>here</InlineLink>.
here
</InlineLink>
.
</InfoTooltip> </InfoTooltip>
</div> </div>

View File

@@ -5,6 +5,7 @@ import { useState } from 'react'
import type { ModalProps } from '@ui/components/Modal/Modal' import type { ModalProps } from '@ui/components/Modal/Modal'
import TwoOptionToggle from 'components/ui/TwoOptionToggle' import TwoOptionToggle from 'components/ui/TwoOptionToggle'
import { DOCS_URL } from 'lib/constants'
import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2' import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2'
import { Button, CodeBlock, Modal, Tabs } from 'ui' import { Button, CodeBlock, Modal, Tabs } from 'ui'
import { Markdown } from '../Markdown' import { Markdown } from '../Markdown'
@@ -104,7 +105,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => {
<div className="flex justify-between items-center gap-x-2"> <div className="flex justify-between items-center gap-x-2">
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/deployment/database-migrations" href={`${DOCS_URL}/guides/deployment/database-migrations`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -114,7 +115,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => {
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/cli/local-development" href={`${DOCS_URL}/guides/cli/local-development`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -1,3 +1,4 @@
import { DOCS_URL } from 'lib/constants'
import type { SQLTemplate } from './SQLEditor.types' import type { SQLTemplate } from './SQLEditor.types'
export const SQL_TEMPLATES: SQLTemplate[] = [ export const SQL_TEMPLATES: SQLTemplate[] = [
@@ -901,7 +902,7 @@ create table profiles (
constraint username_length check (char_length(username) >= 3) constraint username_length check (char_length(username) >= 3)
); );
-- Set up Row Level Security (RLS) -- Set up Row Level Security (RLS)
-- See https://supabase.com/docs/guides/auth/row-level-security for more details. -- See ${DOCS_URL}/guides/auth/row-level-security for more details.
alter table profiles alter table profiles
enable row level security; enable row level security;
@@ -915,7 +916,7 @@ create policy "Users can update own profile." on profiles
for update using ((select auth.uid()) = id); for update using ((select auth.uid()) = id);
-- This trigger automatically creates a profile entry when a new user signs up via Supabase Auth. -- This trigger automatically creates a profile entry when a new user signs up via Supabase Auth.
-- See https://supabase.com/docs/guides/auth/managing-user-data#using-triggers for more details. -- See ${DOCS_URL}/guides/auth/managing-user-data#using-triggers for more details.
create function public.handle_new_user() create function public.handle_new_user()
returns trigger returns trigger
set search_path = '' set search_path = ''
@@ -935,7 +936,7 @@ insert into storage.buckets (id, name)
values ('avatars', 'avatars'); values ('avatars', 'avatars');
-- Set up access controls for storage. -- Set up access controls for storage.
-- See https://supabase.com/docs/guides/storage#policy-examples for more details. -- See ${DOCS_URL}/guides/storage#policy-examples for more details.
create policy "Avatar images are publicly accessible." on storage.objects create policy "Avatar images are publicly accessible." on storage.objects
for select using (bucket_id = 'avatars'); for select using (bucket_id = 'avatars');

View File

@@ -9,6 +9,7 @@ import { InlineLink, InlineLinkClassName } from 'components/ui/InlineLink'
import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { useDatabaseSelectorStateSnapshot } from 'state/database-selector' import { useDatabaseSelectorStateSnapshot } from 'state/database-selector'
import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2' import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2'
import { AiIconAnimation, Button, cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { AiIconAnimation, Button, cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
@@ -72,11 +73,13 @@ const UtilityTabResults = forwardRef<HTMLDivElement, UtilityTabResultsProps>(
</p> </p>
<p className="text-sm text-foreground-light"> <p className="text-sm text-foreground-light">
You can either{' '} You can either{' '}
<InlineLink href="https://supabase.com/docs/guides/platform/performance#examining-query-performance"> <InlineLink
href={`${DOCS_URL}/guides/platform/performance#examining-query-performance`}
>
optimize your query optimize your query
</InlineLink> </InlineLink>
, or{' '} , or{' '}
<InlineLink href="https://supabase.com/docs/guides/database/timeouts"> <InlineLink href={`${DOCS_URL}/guides/database/timeouts`}>
increase the statement timeout increase the statement timeout
</InlineLink> </InlineLink>
{' or '} {' or '}

View File

@@ -9,6 +9,7 @@ import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-co
import { useProjectPostgrestConfigUpdateMutation } from 'data/config/project-postgrest-config-update-mutation' import { useProjectPostgrestConfigUpdateMutation } from 'data/config/project-postgrest-config-update-mutation'
import { useSchemasQuery } from 'data/database/schemas-query' import { useSchemasQuery } from 'data/database/schemas-query'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -122,7 +123,7 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<DocsButton <DocsButton
abbrev={false} abbrev={false}
className="w-min mt-4" className="w-min mt-4"
href="https://supabase.com/docs/guides/database/hardening-data-api" href={`${DOCS_URL}/guides/database/hardening-data-api`}
/> />
</DialogSection> </DialogSection>

View File

@@ -17,6 +17,7 @@ import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-ex
import { useSchemasQuery } from 'data/database/schemas-query' import { useSchemasQuery } from 'data/database/schemas-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -170,7 +171,7 @@ export const PostgrestConfig = () => {
<CardHeader className="flex-row items-center justify-between"> <CardHeader className="flex-row items-center justify-between">
Data API Settings Data API Settings
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-2">
<DocsButton href="https://supabase.com/docs/guides/database/connecting-to-postgres#data-apis" /> <DocsButton href={`${DOCS_URL}/guides/database/connecting-to-postgres#data-apis`} />
<Button type="default" icon={<Lock />} onClick={() => setShowModal(true)}> <Button type="default" icon={<Lock />} onClick={() => setShowModal(true)}>
Harden Data API Harden Data API
</Button> </Button>

View File

@@ -36,7 +36,7 @@ import {
useSelectedProjectQuery, useSelectedProjectQuery,
} from 'hooks/misc/useSelectedProject' } from 'hooks/misc/useSelectedProject'
import { getCloudProviderArchitecture } from 'lib/cloudprovider-utils' import { getCloudProviderArchitecture } from 'lib/cloudprovider-utils'
import { BASE_PATH, INSTANCE_MICRO_SPECS, INSTANCE_NANO_SPECS } from 'lib/constants' import { BASE_PATH, DOCS_URL, INSTANCE_MICRO_SPECS, INSTANCE_NANO_SPECS } from 'lib/constants'
import { getDatabaseMajorVersion, getSemanticVersion } from 'lib/helpers' import { getDatabaseMajorVersion, getSemanticVersion } from 'lib/helpers'
import { useAddonsPagePanel } from 'state/addons-page' import { useAddonsPagePanel } from 'state/addons-page'
import { Alert, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { Alert, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui'
@@ -180,7 +180,7 @@ export const Addons = () => {
<p className="text-sm text-foreground-light m-0">More information</p> <p className="text-sm text-foreground-light m-0">More information</p>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/platform/compute-add-ons" href={`${DOCS_URL}/guides/platform/compute-add-ons`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -192,7 +192,7 @@ export const Addons = () => {
</div> </div>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pooler" href={`${DOCS_URL}/guides/database/connecting-to-postgres#connection-pooler`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -347,7 +347,7 @@ export const Addons = () => {
<p className="text-sm text-foreground-light m-0">More information</p> <p className="text-sm text-foreground-light m-0">More information</p>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/platform/ipv4-address" href={`${DOCS_URL}/guides/platform/ipv4-address`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -424,7 +424,7 @@ export const Addons = () => {
<p className="text-sm text-foreground-light m-0">More information</p> <p className="text-sm text-foreground-light m-0">More information</p>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/platform/backups#point-in-time-recovery" href={`${DOCS_URL}/guides/platform/backups#point-in-time-recovery`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
@@ -548,7 +548,7 @@ export const Addons = () => {
<p className="text-sm text-foreground-light m-0">More information</p> <p className="text-sm text-foreground-light m-0">More information</p>
<div> <div>
<Link <Link
href="https://supabase.com/docs/guides/platform/custom-domains" href={`${DOCS_URL}/guides/platform/custom-domains`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -11,6 +11,7 @@ import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query'
import type { AddonVariantId } from 'data/subscriptions/types' import type { AddonVariantId } from 'data/subscriptions/types'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { useAddonsPagePanel } from 'state/addons-page' import { useAddonsPagePanel } from 'state/addons-page'
import { import {
@@ -119,7 +120,7 @@ const CustomDomainSidePanel = () => {
<h4>Custom domains</h4> <h4>Custom domains</h4>
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/platform/custom-domains" href={`${DOCS_URL}/guides/platform/custom-domains`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -13,6 +13,7 @@ import type { AddonVariantId } from 'data/subscriptions/types'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useIsAwsCloudProvider } from 'hooks/misc/useSelectedProject' import { useIsAwsCloudProvider } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { useAddonsPagePanel } from 'state/addons-page' import { useAddonsPagePanel } from 'state/addons-page'
import { Button, Radio, SidePanel, cn } from 'ui' import { Button, Radio, SidePanel, cn } from 'ui'
@@ -104,7 +105,7 @@ const IPv4SidePanel = () => {
<h4>Dedicated IPv4 address</h4> <h4>Dedicated IPv4 address</h4>
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/platform/ipv4-address" href={`${DOCS_URL}/guides/platform/ipv4-address`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -16,7 +16,7 @@ import type { AddonVariantId } from 'data/subscriptions/types'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { BASE_PATH } from 'lib/constants' import { BASE_PATH, DOCS_URL } from 'lib/constants'
import { formatCurrency } from 'lib/helpers' import { formatCurrency } from 'lib/helpers'
import { useAddonsPagePanel } from 'state/addons-page' import { useAddonsPagePanel } from 'state/addons-page'
import { import {
@@ -167,7 +167,7 @@ const PITRSidePanel = () => {
<h4>Point in Time Recovery</h4> <h4>Point in Time Recovery</h4>
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}> <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
<Link <Link
href="https://supabase.com/docs/guides/platform/backups#point-in-time-recovery" href={`${DOCS_URL}/guides/platform/backups#point-in-time-recovery`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -14,6 +14,7 @@ import { useBannedIPsQuery } from 'data/banned-ips/banned-ips-query'
import { useUserIPAddressQuery } from 'data/misc/user-ip-address-query' import { useUserIPAddressQuery } from 'data/misc/user-ip-address-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { Badge, Skeleton } from 'ui' import { Badge, Skeleton } from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
@@ -78,7 +79,7 @@ const BannedIPs = () => {
title="Network Bans" title="Network Bans"
description="List of IP addresses that are temporarily blocked if their traffic pattern looks abusive" description="List of IP addresses that are temporarily blocked if their traffic pattern looks abusive"
/> />
<DocsButton href="https://supabase.com/docs/reference/cli/supabase-network-bans" /> <DocsButton href={`${DOCS_URL}/reference/cli/supabase-network-bans`} />
</div> </div>
<FormPanel> <FormPanel>
{ipListLoading ? ( {ipListLoading ? (

View File

@@ -20,6 +20,7 @@ import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -150,7 +151,9 @@ export const ConnectionPooling = () => {
<Badge>Shared/Dedicated Pooler</Badge> <Badge>Shared/Dedicated Pooler</Badge>
)} )}
</div> </div>
<DocsButton href="https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pooler" /> <DocsButton
href={`${DOCS_URL}/guides/database/connecting-to-postgres#connection-pooler`}
/>
</div> </div>
} }
footer={ footer={
@@ -277,7 +280,9 @@ export const ConnectionPooling = () => {
</p> </p>
<p className="mt-2"> <p className="mt-2">
Please refer to our{' '} Please refer to our{' '}
<InlineLink href="https://supabase.com/docs/guides/database/connection-management#configuring-supavisors-pool-size"> <InlineLink
href={`${DOCS_URL}/guides/database/connection-management#configuring-supavisors-pool-size`}
>
documentation documentation
</InlineLink>{' '} </InlineLink>{' '}
to find out more. to find out more.

View File

@@ -5,6 +5,7 @@ import { useState } from 'react'
import { useResourceWarningsQuery } from 'data/usage/resource-warnings-query' import { useResourceWarningsQuery } from 'data/usage/resource-warnings-query'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { DOCS_URL } from 'lib/constants'
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui'
import ConfirmDisableReadOnlyModeModal from './DatabaseSettings/ConfirmDisableReadOnlyModal' import ConfirmDisableReadOnlyModeModal from './DatabaseSettings/ConfirmDisableReadOnlyModal'
@@ -62,7 +63,7 @@ export const DatabaseReadOnlyAlert = () => {
</Button> </Button>
<Button asChild type="default" icon={<ExternalLink />}> <Button asChild type="default" icon={<ExternalLink />}>
<a <a
href="https://supabase.com/docs/guides/platform/database-size#disabling-read-only-mode" href={`${DOCS_URL}/guides/platform/database-size#disabling-read-only-mode`}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >

View File

@@ -16,6 +16,7 @@ import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { useUrlState } from 'hooks/ui/useUrlState' import { useUrlState } from 'hooks/ui/useUrlState'
import { DOCS_URL } from 'lib/constants'
import { formatBytes } from 'lib/helpers' import { formatBytes } from 'lib/helpers'
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button, InfoIcon } from 'ui' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button, InfoIcon } from 'ui'
@@ -135,7 +136,7 @@ If you upload more than 1.5x the current size of your storage, your database wil
into read-only mode. If you know how big your database is going to be, you can into read-only mode. If you know how big your database is going to be, you can
manually increase the size here. manually increase the size here.
Read more about [disk management](https://supabase.com/docs/guides/platform/database-size#disk-management) and how to [free up storage space](https://supabase.com/docs/guides/platform/database-size#vacuum-operations). Read more about [disk management](${DOCS_URL}/guides/platform/database-size#disk-management) and how to [free up storage space](${DOCS_URL}/guides/platform/database-size#vacuum-operations).
`} `}
/> />
</AlertDescription_Shadcn_> </AlertDescription_Shadcn_>

View File

@@ -11,6 +11,7 @@ import { useProjectDiskResizeMutation } from 'data/config/project-disk-resize-mu
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
AlertDescription_Shadcn_, AlertDescription_Shadcn_,
AlertTitle_Shadcn_, AlertTitle_Shadcn_,
@@ -144,7 +145,7 @@ const DiskSizeConfigurationModal = ({
)}. You can resize your database again in approximately ${formattedTimeTillNextAvailableResize}`} )}. You can resize your database again in approximately ${formattedTimeTillNextAvailableResize}`}
</div> </div>
<Button asChild type="default" iconRight={<ExternalLink size={14} />}> <Button asChild type="default" iconRight={<ExternalLink size={14} />}>
<Link href="https://supabase.com/docs/guides/platform/database-size#disk-management"> <Link href={`${DOCS_URL}/guides/platform/database-size#disk-management`}>
Read more about disk management Read more about disk management
</Link> </Link>
</Button> </Button>

View File

@@ -5,6 +5,7 @@ import { Button, Form, Input, Modal, Tooltip, TooltipContent, TooltipTrigger } f
import InformationBox from 'components/ui/InformationBox' import InformationBox from 'components/ui/InformationBox'
import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query' import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query'
import { useNetworkRestrictionsApplyMutation } from 'data/network-restrictions/network-retrictions-apply-mutation' import { useNetworkRestrictionsApplyMutation } from 'data/network-restrictions/network-retrictions-apply-mutation'
import { DOCS_URL } from 'lib/constants'
import { HelpCircle } from 'lucide-react' import { HelpCircle } from 'lucide-react'
import { import {
checkIfPrivate, checkIfPrivate,
@@ -165,7 +166,7 @@ const AddRestrictionModal = ({
title="Note: Restrictions only apply to direct connections to your database and connection pooler" title="Note: Restrictions only apply to direct connections to your database and connection pooler"
description="They do not currently apply to APIs offered over HTTPS, such as PostgREST, Storage, or Authentication." description="They do not currently apply to APIs offered over HTTPS, such as PostgREST, Storage, or Authentication."
urlLabel="Learn more" urlLabel="Learn more"
url="https://supabase.com/docs/guides/platform/network-restrictions#limitations" url={`${DOCS_URL}/guides/platform/network-restrictions#limitations`}
/> />
<div className="flex space-x-4"> <div className="flex space-x-4">
<div className="w-[55%]"> <div className="w-[55%]">

View File

@@ -12,6 +12,7 @@ import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query' import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
import { import {
Badge, Badge,
Button, Button,
@@ -109,7 +110,7 @@ const NetworkRestrictions = () => {
description="Allow specific IP ranges to have access to your database." description="Allow specific IP ranges to have access to your database."
/> />
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-2">
<DocsButton href="https://supabase.com/docs/guides/platform/network-restrictions" /> <DocsButton href={`${DOCS_URL}/guides/platform/network-restrictions`} />
{!canUpdateNetworkRestrictions ? ( {!canUpdateNetworkRestrictions ? (
<ButtonTooltip <ButtonTooltip
disabled disabled

Some files were not shown because too many files have changed in this diff Show More