From 5f533247e1dd6737e7b97c32e2e51f3974a18aef Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Fri, 26 Sep 2025 18:16:33 +0800 Subject: [PATCH 1/3] Update docs url to env var (#38772) * Update Supabase docs URLs to use env variable Co-authored-by: a * 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 * 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 * replace more instances * ci: Autofix updates from GitHub workflow * remaining instances * fix duplicate useRouter --------- Co-authored-by: Cursor Agent Co-authored-by: alaister <10985857+alaister@users.noreply.github.com> --- .../grid/components/grid/Grid.utils.tsx | 3 +- .../grid/components/header/Header.tsx | 3 +- .../App/FeaturePreview/Branching2Preview.tsx | 4 +- .../App/FeaturePreview/CLSPreview.tsx | 6 +- .../Auth/AuthProvidersForm/AuthAlert.tsx | 3 +- .../AuthProvidersForm/AuthProvidersForm.tsx | 3 +- .../Auth/AuthProvidersFormValidation.tsx | 64 ++++++------- .../Auth/AuthTemplatesValidation.tsx | 16 ++-- .../BasicAuthSettingsForm.tsx | 7 +- .../EmailRateLimitsAlert.tsx | 3 +- .../interfaces/Auth/Hooks/CreateHookSheet.tsx | 3 +- .../interfaces/Auth/Hooks/HookCard.tsx | 3 +- .../PolicyEditorModalTitle.tsx | 6 +- .../ProtectionAuthSettingsForm.tsx | 5 +- .../Auth/RedirectUrls/RedirectUrls.tsx | 3 +- .../ThirdPartyAuthForm/IntegrationCard.tsx | 12 +-- .../Auth/ThirdPartyAuthForm/index.tsx | 7 +- .../interfaces/Billing/SpendCapModal.tsx | 3 +- .../Usage/UsageWarningAlerts/CPUWarnings.tsx | 12 +-- .../Usage/UsageWarningAlerts/RAMWarnings.tsx | 12 +-- .../BranchManagement/EmptyStates.tsx | 3 +- .../interfaces/Connect/Connect.constants.ts | 33 ++++--- .../Database/Backups/BackupItem.tsx | 5 +- .../Extensions/EnableExtensionModal.tsx | 3 +- .../Database/Extensions/ExtensionRow.tsx | 3 +- .../Database/Extensions/Extensions.tsx | 3 +- .../Database/Hooks/HooksList/HooksList.tsx | 3 +- .../Database/Indexes/CreateIndexSidePanel.tsx | 3 +- .../Database/Replication/Destinations.tsx | 3 +- .../DiskManagement/DiskManagementForm.tsx | 6 +- .../DiskManagementPanelForm.tsx | 3 +- .../fields/ComputeSizeField.tsx | 6 +- .../DiskManagement/fields/DiskSizeField.tsx | 7 +- .../interfaces/Docs/GeneratingTypes.tsx | 9 +- .../interfaces/Docs/Pages/UserManagement.tsx | 7 +- .../interfaces/Docs/ResourceContent.tsx | 13 +-- .../EdgeFunctionDetails.tsx | 3 +- .../Functions/FunctionsEmptyState.tsx | 17 +++- .../Functions/TerminalInstructions.tsx | 3 +- .../components/interfaces/Home/Home.tsx | 4 +- .../Home/NewProjectPanel/NewProjectPanel.tsx | 35 ++----- .../interfaces/Home/ServiceStatus.tsx | 3 +- .../GettingStarted/GettingStartedSection.tsx | 10 +- .../interfaces/HomeNew/ServiceStatus.tsx | 3 +- .../interfaces/HomeNew/TopSection.tsx | 3 +- .../Landing/Integrations.constants.tsx | 8 +- .../Vault/Secrets/SecretsManagement.tsx | 3 +- .../Wrappers/Wrappers.constants.ts | 36 ++++---- .../interfaces/Linter/LintDetail.tsx | 7 +- .../interfaces/Linter/Linter.utils.tsx | 87 +++++++----------- .../interfaces/Linter/LinterPageFooter.tsx | 7 +- .../LogDrainDestinationSheetForm.tsx | 6 +- .../BillingBreakdown.constants.ts | 3 +- .../BillingBreakdown/ComputeMetric.tsx | 5 +- .../BillingBreakdown/UpcomingInvoice.tsx | 92 +++++++------------ .../CostControl/CostControl.tsx | 7 +- .../CostControl/SpendCapSidePanel.tsx | 4 +- .../BillingSettings/Restriction.tsx | 11 +-- .../SubscriptionPlanUpdateDialog.tsx | 13 ++- .../AwsMarketplaceCreateNewOrg.tsx | 26 +++--- .../AwsMarketplaceLinkExistingOrg.tsx | 18 ++-- .../OAuthApps/OAuthSecrets/OAuthSecrets.tsx | 5 +- .../OAuthApps/PublishAppSidePanel/index.tsx | 3 +- .../interfaces/Organization/SSO/SSOConfig.tsx | 3 +- .../TeamSettings/InviteMemberButton.tsx | 3 +- .../Organization/TeamSettings/MembersView.tsx | 15 +-- .../TeamSettings/TeamSettings.tsx | 3 +- .../UpdateRolesPanel/UpdateRolesPanel.tsx | 3 +- .../interfaces/Organization/Usage/Compute.tsx | 5 +- .../Organization/Usage/TotalUsage.tsx | 3 +- .../Organization/Usage/Usage.constants.tsx | 25 ++--- .../ProjectAPIDocs/Content/Entities.tsx | 5 +- .../ProjectAPIDocs/FirstLevelNav.tsx | 13 +-- .../ProjectAPIDocs.constants.ts | 50 +++++----- .../ProjectAPIDocs/SecondLevelNav.tsx | 24 ++--- .../ProjectCreation/AdvancedConfiguration.tsx | 8 +- .../ProjectCreation/SpecialSymbolsCallout.tsx | 3 +- .../IndexAdvisorDisabledState.tsx | 3 +- .../QueryPerformance/QueryPerformance.tsx | 10 +- .../Inspector/ChooseChannelPopover/index.tsx | 5 +- .../Realtime/Inspector/MessagesTable.tsx | 3 +- .../Inspector/NoChannelEmptyState.tsx | 3 +- .../Inspector/RealtimeFilterPopover/index.tsx | 3 +- .../UserImpersonationSelector.tsx | 6 +- .../SQLEditor/DownloadSnippetModal.tsx | 5 +- .../interfaces/SQLEditor/SQLEditor.queries.ts | 7 +- .../UtilityPanel/UtilityTabResults.tsx | 7 +- .../Settings/API/HardenAPIModal.tsx | 3 +- .../Settings/API/PostgrestConfig.tsx | 3 +- .../interfaces/Settings/Addons/Addons.tsx | 12 +-- .../Settings/Addons/CustomDomainSidePanel.tsx | 3 +- .../Settings/Addons/IPv4SidePanel.tsx | 3 +- .../Settings/Addons/PITRSidePanel.tsx | 4 +- .../Settings/Database/BannedIPs.tsx | 3 +- .../ConnectionPooling/ConnectionPooling.tsx | 9 +- .../Database/DatabaseReadOnlyAlert.tsx | 3 +- .../Database/DiskSizeConfiguration.tsx | 3 +- .../Database/DiskSizeConfigurationModal.tsx | 3 +- .../AddRestrictionModal.tsx | 3 +- .../NetworkRestrictions.tsx | 3 +- .../Settings/Database/PoolingModesModal.tsx | 5 +- .../Settings/Database/SSLConfiguration.tsx | 3 +- .../ProjectComplianceMode.tsx | 3 +- .../CustomDomainActivate.tsx | 3 +- .../CustomDomainConfig/CustomDomainDelete.tsx | 3 +- .../CustomDomainConfig/CustomDomainVerify.tsx | 3 +- .../CustomDomainsConfigureHostname.tsx | 3 +- .../ProjectUpgradeAlert.tsx | 8 +- .../TransferProjectButton.tsx | 3 +- .../Infrastructure.constants.ts | 20 ++-- .../Infrastructure/InfrastructureActivity.tsx | 4 +- .../DeployNewReplicaPanel.tsx | 10 +- .../Infrastructure/UpgradeWarnings.tsx | 8 +- .../VercelIntegrationConnectionForm.tsx | 3 +- .../Settings/Logs/Logs.constants.ts | 4 +- .../Settings/Logs/LogsQueryPanel.tsx | 3 +- .../Storage/AnalyticBucketDetails/index.tsx | 9 +- .../interfaces/Storage/EditBucketModal.tsx | 6 +- .../StoragePoliciesEditPolicyModal.tsx | 3 +- .../StoragePolicies/StoragePoliciesEditor.tsx | 3 +- .../Storage/StorageSettings/S3Connection.tsx | 3 +- .../StorageSettings/StorageSettings.tsx | 7 +- .../interfaces/Support/SupportForm.utils.tsx | 3 +- .../interfaces/Support/SupportFormV2.tsx | 5 +- .../TableGridEditor/GridHeaderActions.tsx | 3 +- .../ColumnEditor/ColumnEditor.tsx | 3 +- .../ForeignKeySelector/ForeignKeySelector.tsx | 3 +- .../SpreadsheetImport.utils.tsx | 3 +- .../TableEditor/ColumnManagement.tsx | 3 +- .../TableEditor/RLSDisableModal.tsx | 3 +- .../TableEditor/TableEditor.tsx | 5 +- .../layouts/AppLayout/ClockSkewBanner.tsx | 4 +- .../layouts/DocsLayout/DocsLayout.utils.tsx | 6 +- .../EdgeFunctionDetailsLayout.tsx | 3 +- .../layouts/ProjectLayout/BuildingState.tsx | 4 +- .../layouts/ProjectLayout/ConnectingState.tsx | 7 +- .../FeedbackDropdown/FeedbackWidget.tsx | 3 +- .../LayoutHeader/HelpPopover.tsx | 5 +- .../LayoutHeader/LocalVersionPopover.tsx | 9 +- .../PausedState/PauseDisabledState.tsx | 6 +- .../PausedState/ProjectPausedState.tsx | 4 +- .../RestorePaidPlanProjectNotice.tsx | 3 +- .../layouts/SignInLayout/SignInLayout.tsx | 4 +- .../components/ui/GrafanaPromoBanner.tsx | 9 +- .../components/ui/Logs/LogsExplorerHeader.tsx | 3 +- ...sourceExhaustionWarningBanner.constants.ts | 14 +-- apps/studio/data/reports/database-charts.ts | 18 ++-- .../table-rows/table-row-delete-mutation.tsx | 5 +- apps/studio/hooks/analytics/useLogsQuery.tsx | 5 +- apps/studio/lib/ai/prompts.ts | 6 +- apps/studio/lib/constants/index.ts | 2 + apps/studio/pages/account/tokens.tsx | 13 +-- .../api/platform/projects/[ref]/run-lints.ts | 38 ++++---- apps/studio/pages/new/[slug].tsx | 9 +- .../project/[ref]/advisors/performance.tsx | 3 +- .../[ref]/advisors/query-performance.tsx | 5 +- .../pages/project/[ref]/advisors/security.tsx | 3 +- .../pages/project/[ref]/auth/audit-logs.tsx | 5 +- .../studio/pages/project/[ref]/auth/hooks.tsx | 5 +- .../pages/project/[ref]/auth/policies.tsx | 3 +- .../pages/project/[ref]/auth/rate-limits.tsx | 5 +- .../pages/project/[ref]/branches/index.tsx | 3 +- .../project/[ref]/branches/merge-requests.tsx | 3 +- .../project/[ref]/database/backups/pitr.tsx | 4 +- .../backups/restore-to-new-project.tsx | 4 +- .../[ref]/database/backups/scheduled.tsx | 5 +- .../[ref]/database/column-privileges.tsx | 3 +- .../project/[ref]/database/functions.tsx | 3 +- .../pages/project/[ref]/database/indexes.tsx | 7 +- .../project/[ref]/database/migrations.tsx | 10 +- .../pages/project/[ref]/database/triggers.tsx | 3 +- .../pages/project/[ref]/functions/index.tsx | 6 +- .../project/[ref]/integrations/index.tsx | 3 +- .../pages/project/[ref]/realtime/policies.tsx | 5 +- .../pages/project/[ref]/realtime/settings.tsx | 5 +- .../pages/project/[ref]/reports/database.tsx | 9 +- .../pages/project/[ref]/reports/storage.tsx | 6 +- .../project/[ref]/settings/log-drains.tsx | 3 +- .../project/[ref]/storage/buckets/index.tsx | 3 +- apps/studio/pages/support/new.tsx | 4 +- .../scripts/download-graphql-schema.mts | 7 +- turbo.json | 1 + 182 files changed, 746 insertions(+), 688 deletions(-) diff --git a/apps/studio/components/grid/components/grid/Grid.utils.tsx b/apps/studio/components/grid/components/grid/Grid.utils.tsx index e348b4defa2aa..025aeb7102904 100644 --- a/apps/studio/components/grid/components/grid/Grid.utils.tsx +++ b/apps/studio/components/grid/components/grid/Grid.utils.tsx @@ -11,6 +11,7 @@ import { tableRowKeys } from 'data/table-rows/keys' import { useTableRowUpdateMutation } from 'data/table-rows/table-row-update-mutation' import type { TableRowsData } from 'data/table-rows/table-rows-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { useGetImpersonatedRoleState } from 'state/role-impersonation-state' import { useTableEditorTableStateSnapshot } from 'state/table-editor-table' import { Dictionary } from 'types' @@ -115,7 +116,7 @@ export function useOnRowsChange(rows: SupaRow[]) { each row before updating or deleting the row.

- +
), diff --git a/apps/studio/components/grid/components/header/Header.tsx b/apps/studio/components/grid/components/header/Header.tsx index 696524f4d2032..d23850a107126 100644 --- a/apps/studio/components/grid/components/header/Header.tsx +++ b/apps/studio/components/grid/components/header/Header.tsx @@ -17,6 +17,7 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { RoleImpersonationState } from 'lib/role-impersonation' import { useRoleImpersonationStateSnapshot, @@ -47,7 +48,7 @@ export const MAX_EXPORT_ROW_COUNT_MESSAGE = ( <> Sorry! We're unable to support exporting row counts larger than $ {MAX_EXPORT_ROW_COUNT.toLocaleString()} at the moment. Alternatively, you may consider using - + pg_dump {' '} via our CLI instead. diff --git a/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx index 9bf5f6d30c1d5..35f3c6c7f427f 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx @@ -1,7 +1,7 @@ import Image from 'next/image' import { InlineLink } from 'components/ui/InlineLink' -import { BASE_PATH } from 'lib/constants' +import { BASE_PATH, DOCS_URL } from 'lib/constants' export const Branching2Preview = () => { return ( @@ -16,7 +16,7 @@ export const Branching2Preview = () => {

Create branches, review changes, and merge back into production all through the dashboard. Read the below limitations and our{' '} - + branching documentation {' '} before opting in. diff --git a/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx index 57f156148f839..ddf714506d95a 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx @@ -3,7 +3,7 @@ import Image from 'next/image' import { useParams } from 'common' import { Markdown } from 'components/interfaces/Markdown' 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' export const CLSPreview = () => { @@ -14,11 +14,11 @@ export const CLSPreview = () => {

diff --git a/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthAlert.tsx b/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthAlert.tsx index 3679b94fb5658..5b8e74dd0cd24 100644 --- a/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthAlert.tsx +++ b/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthAlert.tsx @@ -2,6 +2,7 @@ import { ExternalLink } from 'lucide-react' import Link from 'next/link' import { useParams } from 'common' +import { DOCS_URL } from 'lib/constants' import { Alert_Shadcn_, AlertDescription_Shadcn_, @@ -31,7 +32,7 @@ export const AuthAlert = ({ below. Developers using this provider should move over to the new provider. Please refer to our{' '} diff --git a/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthProvidersForm.tsx b/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthProvidersForm.tsx index 1b118c25af6fb..65adb7ac94740 100644 --- a/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthProvidersForm.tsx +++ b/apps/studio/components/interfaces/Auth/AuthProvidersForm/AuthProvidersForm.tsx @@ -10,6 +10,7 @@ import { import { ResourceList } from 'components/ui/Resource/ResourceList' import { HorizontalShimmerWithIcon } from 'components/ui/Shimmers/Shimmers' import { useAuthConfigQuery } from 'data/auth/auth-config-query' +import { DOCS_URL } from 'lib/constants' import { Alert_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.

diff --git a/apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx b/apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx index 5d0a3d42ea528..5e530c411ae01 100644 --- a/apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx +++ b/apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx @@ -1,5 +1,6 @@ import { NO_REQUIRED_CHARACTERS, urlRegex } from 'components/interfaces/Auth/Auth.constants' import { ProjectAuthConfigData } from 'data/auth/auth-config-query' +import { DOCS_URL } from 'lib/constants' import { boolean, number, object, string } from 'yup' const parseBase64URL = (b64url: string) => { @@ -12,7 +13,7 @@ const PROVIDER_EMAIL = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Email', - link: 'https://supabase.com/docs/guides/auth/passwords', + link: `${DOCS_URL}/guides/auth/passwords`, properties: { EXTERNAL_EMAIL_ENABLED: { title: 'Enable Email provider', @@ -95,7 +96,7 @@ const PROVIDER_EMAIL = { misc: { iconKey: 'email-icon2', 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, type: 'object', title: 'Phone', - link: 'https://supabase.com/docs/guides/auth/phone-login', + link: `${DOCS_URL}/guides/auth/phone-login`, properties: { EXTERNAL_PHONE_ENABLED: { title: 'Enable Phone provider', @@ -418,7 +419,7 @@ export const PROVIDER_PHONE = { misc: { iconKey: 'phone-icon4', 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, type: 'object', title: 'Apple', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-apple', + link: `${DOCS_URL}/guides/auth/social-login/auth-apple`, properties: { EXTERNAL_APPLE_ENABLED: { title: 'Enable Sign in with Apple', @@ -441,7 +442,7 @@ const EXTERNAL_PROVIDER_APPLE = { }, EXTERNAL_APPLE_SECRET: { 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', isSecret: true, }, @@ -527,7 +528,7 @@ const EXTERNAL_PROVIDER_APPLE = { iconKey: 'apple-icon', requiresRedirect: true, 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: { 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.`, @@ -539,7 +540,7 @@ const EXTERNAL_PROVIDER_AZURE = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Azure', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-azure', + link: `${DOCS_URL}/guides/auth/social-login/auth-azure`, properties: { EXTERNAL_AZURE_ENABLED: { title: 'Azure enabled', @@ -553,7 +554,7 @@ const EXTERNAL_PROVIDER_AZURE = { EXTERNAL_AZURE_SECRET: { // [TODO] Change docs 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', isSecret: true, }, @@ -588,7 +589,7 @@ const EXTERNAL_PROVIDER_BITBUCKET = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Bitbucket', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-bitbucket', + link: `${DOCS_URL}/guides/auth/social-login/auth-bitbucket`, properties: { EXTERNAL_BITBUCKET_ENABLED: { title: 'Bitbucket enabled', @@ -627,7 +628,7 @@ const EXTERNAL_PROVIDER_DISCORD = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Discord', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-discord?', + link: `${DOCS_URL}/guides/auth/social-login/auth-discord?`, properties: { EXTERNAL_DISCORD_ENABLED: { title: 'Discord enabled', @@ -666,7 +667,7 @@ const EXTERNAL_PROVIDER_FACEBOOK = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Facebook', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-facebook', + link: `${DOCS_URL}/guides/auth/social-login/auth-facebook`, properties: { EXTERNAL_FACEBOOK_ENABLED: { title: 'Facebook enabled', @@ -705,7 +706,7 @@ const EXTERNAL_PROVIDER_FIGMA = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Figma', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-figma', + link: `${DOCS_URL}/guides/auth/social-login/auth-figma`, properties: { EXTERNAL_FIGMA_ENABLED: { title: 'Figma enabled', @@ -744,7 +745,7 @@ const EXTERNAL_PROVIDER_GITHUB = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'GitHub', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-github', + link: `${DOCS_URL}/guides/auth/social-login/auth-github`, properties: { EXTERNAL_GITHUB_ENABLED: { title: 'GitHub enabled', @@ -783,7 +784,7 @@ const EXTERNAL_PROVIDER_GITLAB = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'GitLab', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-gitlab', + link: `${DOCS_URL}/guides/auth/social-login/auth-gitlab`, properties: { EXTERNAL_GITLAB_ENABLED: { title: 'GitLab enabled', @@ -830,7 +831,7 @@ const EXTERNAL_PROVIDER_GOOGLE = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Google', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-google', + link: `${DOCS_URL}/guides/auth/social-login/auth-google`, properties: { EXTERNAL_GOOGLE_ENABLED: { title: 'Enable Sign in with Google', @@ -884,7 +885,7 @@ const EXTERNAL_PROVIDER_GOOGLE = { iconKey: 'google-icon', requiresRedirect: true, 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, type: 'object', title: 'Kakao', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-kakao', + link: `${DOCS_URL}/guides/auth/social-login/auth-kakao`, properties: { EXTERNAL_KAKAO_ENABLED: { title: 'Kakao enabled', @@ -934,7 +935,7 @@ const EXTERNAL_PROVIDER_KEYCLOAK = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'KeyCloak', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-keycloak', + link: `${DOCS_URL}/guides/auth/social-login/auth-keycloak`, properties: { EXTERNAL_KEYCLOAK_ENABLED: { title: 'Keycloak enabled', @@ -985,7 +986,7 @@ const EXTERNAL_PROVIDER_LINKEDIN_OIDC = { type: 'object', key: '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: { EXTERNAL_LINKEDIN_OIDC_ENABLED: { title: 'LinkedIn enabled', @@ -1024,7 +1025,7 @@ const EXTERNAL_PROVIDER_NOTION = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Notion', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-notion', + link: `${DOCS_URL}/guides/auth/social-login/auth-notion`, properties: { EXTERNAL_NOTION_ENABLED: { title: 'Notion enabled', @@ -1063,7 +1064,7 @@ const EXTERNAL_PROVIDER_TWITCH = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Twitch', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-twitch', + link: `${DOCS_URL}/guides/auth/social-login/auth-twitch`, properties: { EXTERNAL_TWITCH_ENABLED: { title: 'Twitch enabled', @@ -1102,7 +1103,7 @@ const EXTERNAL_PROVIDER_TWITTER = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Twitter', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-twitter', + link: `${DOCS_URL}/guides/auth/social-login/auth-twitter`, properties: { EXTERNAL_TWITTER_ENABLED: { title: 'Twitter enabled', @@ -1141,7 +1142,7 @@ const EXTERNAL_PROVIDER_SLACK = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Slack (Deprecated)', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-slack', + link: `${DOCS_URL}/guides/auth/social-login/auth-slack`, properties: { EXTERNAL_SLACK_ENABLED: { title: 'Slack enabled', @@ -1181,7 +1182,7 @@ const EXTERNAL_PROVIDER_SLACK_OIDC = { type: 'object', title: '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: { EXTERNAL_SLACK_OIDC_ENABLED: { title: 'Slack enabled', @@ -1220,7 +1221,7 @@ const EXTERNAL_PROVIDER_SPOTIFY = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Spotify', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-spotify', + link: `${DOCS_URL}/guides/auth/social-login/auth-spotify`, properties: { EXTERNAL_SPOTIFY_ENABLED: { title: 'Spotify enabled', @@ -1259,7 +1260,7 @@ const EXTERNAL_PROVIDER_WORKOS = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'WorkOS', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-workos', + link: `${DOCS_URL}/guides/auth/social-login/auth-workos`, properties: { EXTERNAL_WORKOS_ENABLED: { title: 'WorkOS enabled', @@ -1309,7 +1310,7 @@ const EXTERNAL_PROVIDER_ZOOM = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Zoom', - link: 'https://supabase.com/docs/guides/auth/social-login/auth-zoom', + link: `${DOCS_URL}/guides/auth/social-login/auth-zoom`, properties: { EXTERNAL_ZOOM_ENABLED: { title: 'Zoom enabled', @@ -1348,12 +1349,11 @@ const PROVIDER_SAML = { $schema: JSON_SCHEMA_VERSION, type: 'object', 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: { SAML_ENABLED: { title: 'Enable SAML 2.0 Single Sign-on', - description: - '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', + 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`, type: 'boolean', }, SAML_EXTERNAL_URL: { @@ -1385,7 +1385,7 @@ const PROVIDER_WEB3 = { $schema: JSON_SCHEMA_VERSION, type: 'object', title: 'Web3 Wallet', - link: 'https://supabase.com/docs/guides/auth/auth-web3', + link: `${DOCS_URL}/guides/auth/auth-web3`, properties: { EXTERNAL_WEB3_ETHEREUM_ENABLED: { title: 'Enable Sign in with Ethereum', diff --git a/apps/studio/components/interfaces/Auth/AuthTemplatesValidation.tsx b/apps/studio/components/interfaces/Auth/AuthTemplatesValidation.tsx index cfc574698ec57..390ba87c0e730 100644 --- a/apps/studio/components/interfaces/Auth/AuthTemplatesValidation.tsx +++ b/apps/studio/components/interfaces/Auth/AuthTemplatesValidation.tsx @@ -1,6 +1,8 @@ -import type { FormSchema } from 'types' 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 CONFIRMATION: FormSchema = { @@ -34,7 +36,7 @@ const CONFIRMATION: FormSchema = { misc: { iconKey: 'email-icon2', 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: { iconKey: 'email-icon2', 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: { iconKey: 'email-icon2', 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: { iconKey: 'email-icon2', 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: { iconKey: 'email-icon2', 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 = { @@ -206,7 +208,7 @@ const REAUTHENTICATION: FormSchema = { misc: { iconKey: 'email-icon2', 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)`, }, } diff --git a/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm/BasicAuthSettingsForm.tsx b/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm/BasicAuthSettingsForm.tsx index af36ff6689b6e..3717cad6b9ed7 100644 --- a/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm/BasicAuthSettingsForm.tsx +++ b/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm/BasicAuthSettingsForm.tsx @@ -15,6 +15,7 @@ import { useAuthConfigQuery } from 'data/auth/auth-config-query' import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -186,7 +187,7 @@ export const BasicAuthSettingsForm = () => { Enable{' '} manual linking APIs {' '} @@ -219,7 +220,7 @@ export const BasicAuthSettingsForm = () => { Enable{' '} anonymous sign-ins {' '} @@ -263,7 +264,7 @@ export const BasicAuthSettingsForm = () => { to ensure that access to your data is restricted where required.

diff --git a/apps/studio/components/interfaces/Auth/EmailRateLimitsAlert/EmailRateLimitsAlert.tsx b/apps/studio/components/interfaces/Auth/EmailRateLimitsAlert/EmailRateLimitsAlert.tsx index e5e4d39fdb7d5..86c6a517ba116 100644 --- a/apps/studio/components/interfaces/Auth/EmailRateLimitsAlert/EmailRateLimitsAlert.tsx +++ b/apps/studio/components/interfaces/Auth/EmailRateLimitsAlert/EmailRateLimitsAlert.tsx @@ -2,6 +2,7 @@ import Link from 'next/link' import { useParams } from 'common' import { InlineLink } from 'components/ui/InlineLink' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -20,7 +21,7 @@ export function EmailRateLimitsAlert() { 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{' '} - + documentation {' '} for an up-to-date information on the current rate limits. diff --git a/apps/studio/components/interfaces/Auth/Hooks/CreateHookSheet.tsx b/apps/studio/components/interfaces/Auth/Hooks/CreateHookSheet.tsx index 2e97de91220e5..ecc4de59e659a 100644 --- a/apps/studio/components/interfaces/Auth/Hooks/CreateHookSheet.tsx +++ b/apps/studio/components/interfaces/Auth/Hooks/CreateHookSheet.tsx @@ -17,6 +17,7 @@ import { AuthConfigResponse } from 'data/auth/auth-config-query' import { useAuthHooksUpdateMutation } from 'data/auth/auth-hooks-update-mutation' import { executeSql } from 'data/sql/execute-sql-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Button, FormControl_Shadcn_, @@ -290,7 +291,7 @@ export const CreateHookSheet = ({ {isCreating ? `Add ${title}` : `Update ${title}`}
- + diff --git a/apps/studio/components/interfaces/Auth/Hooks/HookCard.tsx b/apps/studio/components/interfaces/Auth/Hooks/HookCard.tsx index e09e75bf28001..8ec5c5d974402 100644 --- a/apps/studio/components/interfaces/Auth/Hooks/HookCard.tsx +++ b/apps/studio/components/interfaces/Auth/Hooks/HookCard.tsx @@ -4,6 +4,7 @@ import { Check, Webhook } from 'lucide-react' import { ButtonTooltip } from 'components/ui/ButtonTooltip' import { DocsButton } from 'components/ui/DocsButton' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { Badge, Input, copyToClipboard } from 'ui' import { Hook } from './hooks.constants' @@ -108,7 +109,7 @@ export const HookCard = ({ hook, onSelect }: HookCardProps) => { > Configure hook - +
diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorModal/PolicyEditorModalTitle.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorModal/PolicyEditorModalTitle.tsx index dc196a4e6e7d8..cb6071b0db2f3 100644 --- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorModal/PolicyEditorModalTitle.tsx +++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorModal/PolicyEditorModalTitle.tsx @@ -2,6 +2,7 @@ import { noop } from 'lodash' import { ChevronLeft, FlaskConical } from 'lucide-react' import { DocsButton } from 'components/ui/DocsButton' +import { DOCS_URL } from 'lib/constants' import { Button } from 'ui' import { POLICY_MODAL_VIEWS } from '../Policies.constants' @@ -59,10 +60,7 @@ const PolicyEditorModalTitle = ({ Try Supabase Assistant )} - +
) diff --git a/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx b/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx index 791d1ccd6f1cf..748806817ca74 100644 --- a/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx +++ b/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx @@ -13,6 +13,7 @@ import NoPermission from 'components/ui/NoPermission' import { useAuthConfigQuery } from 'data/auth/auth-config-query' import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -214,9 +215,9 @@ export const ProtectionAuthSettingsForm = () => { { allowed, for example, https://*.domain.com - + {isLoading && ( diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx index 4737f81cf4337..be336c3519ef1 100644 --- a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx +++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx @@ -1,8 +1,8 @@ import { Check } from 'lucide-react' import Image from 'next/image' -import { useParams } from 'common' import { ThirdPartyAuthIntegration } from 'data/third-party-auth/integrations-query' +import { DOCS_URL } from 'lib/constants' import { Badge, Button } from 'ui' import { AWS_IDP_REGIONS } from './AwsRegionSelector' import { @@ -29,7 +29,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => { users. You can read more in the{' '}
documentation @@ -44,7 +44,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => { read more in the{' '} documentation @@ -58,7 +58,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => { can read more in the{' '} documentation @@ -73,7 +73,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => { more in the{' '} documentation @@ -88,7 +88,7 @@ export const getIntegrationTypeDescription = (type: INTEGRATION_TYPES) => { more in the{' '} documentation diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx index 3962304fe178f..99890c35aaf6f 100644 --- a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx +++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/index.tsx @@ -18,6 +18,7 @@ import { useThirdPartyAuthIntegrationsQuery, } from 'data/third-party-auth/integrations-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { cn } from 'ui' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import { AddIntegrationDropdown } from './AddIntegrationDropdown' @@ -73,14 +74,16 @@ export const ThirdPartyAuthForm = () => {
Billing is based on the number of monthly active users (MAUs) requesting your API throughout the billing period. Refer to our{' '} - + billing docs {' '} for more information.
- + {integrations.length !== 0 && ( )} diff --git a/apps/studio/components/interfaces/Billing/SpendCapModal.tsx b/apps/studio/components/interfaces/Billing/SpendCapModal.tsx index a119c087a6362..e0c132c4a09f9 100644 --- a/apps/studio/components/interfaces/Billing/SpendCapModal.tsx +++ b/apps/studio/components/interfaces/Billing/SpendCapModal.tsx @@ -1,4 +1,5 @@ import { DocsButton } from 'components/ui/DocsButton' +import { DOCS_URL } from 'lib/constants' import { Button, Modal, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui' interface SpendCapModalProps { @@ -15,7 +16,7 @@ const SpendCapModal = ({ visible, onHide }: SpendCapModalProps) => { header={
Spend Cap - +
} showCloseButton={false} diff --git a/apps/studio/components/interfaces/Billing/Usage/UsageWarningAlerts/CPUWarnings.tsx b/apps/studio/components/interfaces/Billing/Usage/UsageWarningAlerts/CPUWarnings.tsx index fc254440a42f8..daf855d7baa93 100644 --- a/apps/studio/components/interfaces/Billing/Usage/UsageWarningAlerts/CPUWarnings.tsx +++ b/apps/studio/components/interfaces/Billing/Usage/UsageWarningAlerts/CPUWarnings.tsx @@ -1,6 +1,8 @@ -import { AlertTitle } from '@ui/components/shadcn/ui/alert' import { AlertCircle } from 'lucide-react' 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' interface CPUWarningsProps { @@ -22,9 +24,7 @@ const CPUWarnings = ({ isFreePlan, upgradeUrl, severity }: CPUWarningsProps) =>
diff --git a/apps/studio/components/interfaces/Connect/Connect.constants.ts b/apps/studio/components/interfaces/Connect/Connect.constants.ts index 80f82d9560ab9..33ff40fa88b6f 100644 --- a/apps/studio/components/interfaces/Connect/Connect.constants.ts +++ b/apps/studio/components/interfaces/Connect/Connect.constants.ts @@ -1,3 +1,4 @@ +import { DOCS_URL } from 'lib/constants' import { CodeBlockLang } from 'ui' export type DatabaseConnectionType = @@ -75,7 +76,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'nextjs', label: 'Next.js', icon: 'nextjs', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/nextjs', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nextjs`, children: [ { key: 'app', @@ -109,8 +110,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'remix', label: 'Remix', icon: 'remix', - guideLink: - 'https://supabase.com/docs/guides/auth/server-side/creating-a-client?framework=remix&environment=remix-loader', + guideLink: `${DOCS_URL}/guides/auth/server-side/creating-a-client?framework=remix&environment=remix-loader`, children: [ { key: 'supabasejs', @@ -124,7 +124,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'react', label: 'React', icon: 'react', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/reactjs', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/reactjs`, children: [ { key: 'create-react-app', @@ -158,7 +158,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'nuxt', label: 'Nuxt', icon: 'nuxt', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/nuxtjs', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/nuxtjs`, children: [ { key: 'supabasejs', @@ -172,7 +172,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'vuejs', label: 'Vue.JS', icon: 'vuejs', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/vue', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/vue`, children: [ { key: 'supabasejs', @@ -187,7 +187,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'sveltekit', label: 'SvelteKit', icon: 'sveltekit', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/sveltekit', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/sveltekit`, children: [ { key: 'supabasejs', @@ -201,7 +201,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'solidjs', label: 'Solid.js', icon: 'solidjs', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/solidjs', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/solidjs`, children: [ { key: 'supabasejs', @@ -229,7 +229,7 @@ export const FRAMEWORKS: ConnectionType[] = [ key: 'refine', label: 'refine', icon: 'refine', - guideLink: 'https://supabase.com/docs/guides/getting-started/quickstarts/refine', + guideLink: `${DOCS_URL}/guides/getting-started/quickstarts/refine`, children: [ { key: 'supabasejs', @@ -246,7 +246,7 @@ export const MOBILES: ConnectionType[] = [ key: 'exporeactnative', label: 'Expo React Native', 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: [ { key: 'supabasejs', @@ -260,7 +260,7 @@ export const MOBILES: ConnectionType[] = [ key: 'flutter', label: 'Flutter', icon: 'flutter', - guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-flutter', + guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-flutter`, children: [ { key: 'supabaseflutter', @@ -274,7 +274,7 @@ export const MOBILES: ConnectionType[] = [ key: 'ionicreact', label: 'Ionic 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: [ { key: 'supabasejs', @@ -288,7 +288,7 @@ export const MOBILES: ConnectionType[] = [ key: 'swift', label: 'Swift', icon: 'swift', - guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-swift', + guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-swift`, children: [ { key: 'supabaseswift', @@ -302,7 +302,7 @@ export const MOBILES: ConnectionType[] = [ key: 'androidkotlin', label: 'Android Kotlin', icon: 'kotlin', - guideLink: 'https://supabase.com/docs/guides/getting-started/tutorials/with-kotlin', + guideLink: `${DOCS_URL}/guides/getting-started/tutorials/with-kotlin`, children: [ { key: 'supabasekt', @@ -316,7 +316,7 @@ export const MOBILES: ConnectionType[] = [ key: 'ionicangular', label: '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: [ { key: 'supabasejs', @@ -340,8 +340,7 @@ export const ORMS: ConnectionType[] = [ key: 'drizzle', label: 'Drizzle', icon: 'drizzle', - guideLink: - 'https://supabase.com/docs/guides/database/connecting-to-postgres#connecting-with-drizzle', + guideLink: `${DOCS_URL}/guides/database/connecting-to-postgres#connecting-with-drizzle`, children: [], }, ] diff --git a/apps/studio/components/interfaces/Database/Backups/BackupItem.tsx b/apps/studio/components/interfaces/Database/Backups/BackupItem.tsx index 85a69d5680e9b..f298ebd914285 100644 --- a/apps/studio/components/interfaces/Database/Backups/BackupItem.tsx +++ b/apps/studio/components/interfaces/Database/Backups/BackupItem.tsx @@ -7,6 +7,7 @@ import { InlineLink } from 'components/ui/InlineLink' import { useBackupDownloadMutation } from 'data/database/backup-download-mutation' import type { DatabaseBackup } from 'data/database/backups-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { Badge, Tooltip, TooltipContent, TooltipTrigger } from 'ui' 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 download it via pgdump by following our guide{' '} - + here . diff --git a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx index 91414881c7f6e..c6b58a9307a19 100644 --- a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx @@ -10,6 +10,7 @@ import { useSchemasQuery } from 'data/database/schemas-query' import { executeSql } from 'data/sql/execute-sql-query' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useProtectedSchemas } from 'hooks/useProtectedSchemas' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_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 OrioleDB access method - + )} diff --git a/apps/studio/components/interfaces/Database/Extensions/ExtensionRow.tsx b/apps/studio/components/interfaces/Database/Extensions/ExtensionRow.tsx index 3139f8286e776..d418a6ce95cf3 100644 --- a/apps/studio/components/interfaces/Database/Extensions/ExtensionRow.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/ExtensionRow.tsx @@ -9,6 +9,7 @@ import { useDatabaseExtensionDisableMutation } from 'data/database-extensions/da import { DatabaseExtension } from 'data/database-extensions/database-extensions-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { extensions } from 'shared-data' import { Button, Switch, TableCell, TableRow, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { Admonition } from 'ui-patterns' @@ -37,7 +38,7 @@ export const ExtensionRow = ({ extension }: ExtensionRowProps) => { const extensionMeta = extensions.find((item) => item.name === extension.name) const docsUrl = extensionMeta?.link.startsWith('/guides') - ? `https://supabase.com/docs${extensionMeta?.link}` + ? `${DOCS_URL}${extensionMeta?.link}` : extensionMeta?.link ?? undefined const { mutate: disableExtension, isLoading: isDisabling } = useDatabaseExtensionDisableMutation({ diff --git a/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx b/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx index 0885380baa284..08ec649e6d238 100644 --- a/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx @@ -11,6 +11,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Card, Input, @@ -72,7 +73,7 @@ export const Extensions = () => { className="w-52" icon={} /> - +
diff --git a/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx b/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx index 7e43bf126ace6..56dbdfbd0130e 100644 --- a/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx +++ b/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx @@ -12,6 +12,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { useDatabaseHooksQuery } from 'data/database-triggers/database-triggers-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { noop } from 'lib/void' import { Input } from 'ui' import { HooksListEmpty } from './HooksListEmpty' @@ -63,7 +64,7 @@ export const HooksList = ({ onChange={(e) => setFilterString(e.target.value)} />
- + createHook()} disabled={!isPermissionsLoaded || !canCreateWebhooks} diff --git a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx index fbf2c949d6388..a76f24f6ae7fb 100644 --- a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx +++ b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx @@ -11,6 +11,7 @@ import { useSchemasQuery } from 'data/database/schemas-query' import { useTableColumnsQuery } from 'data/database/table-columns-query' import { useEntityTypesQuery } from 'data/entity-types/entity-types-infinite-query' import { useIsOrioleDb, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Button, 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" > {/* [Joshen Oriole] Hook up proper docs URL */} - + )} diff --git a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx index 604b908c1d762..88a6a25458872 100644 --- a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx +++ b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx @@ -11,6 +11,7 @@ import { replicationKeys } from 'data/replication/keys' import { fetchReplicationPipelineVersion } from 'data/replication/pipeline-version-query' import { useReplicationPipelinesQuery } from 'data/replication/pipelines-query' import { useReplicationSourcesQuery } from 'data/replication/sources-query' +import { DOCS_URL } from 'lib/constants' import { Button, cn, Input_Shadcn_ } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns' import { DestinationPanel } from './DestinationPanel' @@ -136,7 +137,7 @@ export const Destinations = () => {
{/* [Joshen] Placeholder for when we have documentation */} - +
) : hasDestinations ? ( diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx b/apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx index cf0757aee7908..a79cfa8db1eab 100644 --- a/apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx +++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx @@ -32,7 +32,7 @@ import { useIsAwsK8sCloudProvider, useSelectedProjectQuery, } 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 { Button, @@ -372,7 +372,7 @@ export function DiskManagementForm() { )} @@ -385,7 +385,7 @@ export function DiskManagementForm() { )} diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx b/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx index 7c6c56ef9ec63..e9a580af50c9c 100644 --- a/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx +++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx @@ -2,6 +2,7 @@ import Link from 'next/link' import { useParams } from 'common' import { FormHeader } from 'components/ui/Forms/FormHeader' +import { DOCS_URL } from 'lib/constants' import { Button } from 'ui' import { NoticeBar } from './ui/NoticeBar' @@ -13,7 +14,7 @@ export function DiskManagementPanelForm() {
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx index ce2105adb2214..9b6057676a281 100644 --- a/apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx +++ b/apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx @@ -8,7 +8,7 @@ import { useDiskUtilizationQuery } from 'data/config/disk-utilization-query' import dayjs from 'dayjs' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' 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 { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { DiskStorageSchemaType } from '../DiskManagement.schema' @@ -156,10 +156,7 @@ export function DiskSizeField({ `Your plan includes ${includedDiskGB} GB of disk size for ${watchedStorageType}.`}
- +

Generating types - +

@@ -53,10 +54,8 @@ export default function GeneratingTypes({ selectedLang }: Props) {

You can generate types from your database either through the{' '} - - Supabase CLI - - , or by downloading the types file via the button on the right and importing it in your + Supabase CLI, or + by downloading the types file via the button on the right and importing it in your application within src/index.ts.

diff --git a/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx b/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx index ff4ef5661ebe2..35a056b4a0226 100644 --- a/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx +++ b/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx @@ -4,6 +4,7 @@ import { useRouter } from 'next/router' import { useParams } from 'common' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' +import { DOCS_URL } from 'lib/constants' import { makeRandomString } from 'lib/helpers' import CodeSnippet from '../CodeSnippet' import Snippets from '../Snippets' @@ -179,11 +180,7 @@ export const UserManagement = ({ selectedLang, showApiKey }: UserManagementProps

View all the available{' '} - + Third Party OAuth providers

diff --git a/apps/studio/components/interfaces/Docs/ResourceContent.tsx b/apps/studio/components/interfaces/Docs/ResourceContent.tsx index cefe96e153c54..610eb85c4ddc7 100644 --- a/apps/studio/components/interfaces/Docs/ResourceContent.tsx +++ b/apps/studio/components/interfaces/Docs/ResourceContent.tsx @@ -8,6 +8,7 @@ import Snippets from 'components/interfaces/Docs/Snippets' import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query' import { useProjectJsonSchemaQuery } from 'data/docs/project-json-schema-query' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' +import { DOCS_URL } from 'lib/constants' interface ResourceContentProps { apiEndpoint: string @@ -120,7 +121,7 @@ const ResourceContent = ({

@@ -157,7 +158,7 @@ const ResourceContent = ({

Supabase provides a wide range of filters.

@@ -188,7 +189,7 @@ const ResourceContent = ({

@@ -228,7 +229,7 @@ const ResourceContent = ({

@@ -256,7 +257,7 @@ const ResourceContent = ({

@@ -285,7 +286,7 @@ const ResourceContent = ({

diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx index d4b163cfee413..74aab28e1c10c 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx @@ -19,6 +19,7 @@ import { useEdgeFunctionQuery } from 'data/edge-functions/edge-function-query' import { useEdgeFunctionDeleteMutation } from 'data/edge-functions/edge-functions-delete-mutation' import { useEdgeFunctionUpdateMutation } from 'data/edge-functions/edge-functions-update-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { Alert_Shadcn_, AlertDescription_Shadcn_, @@ -378,7 +379,7 @@ export const EdgeFunctionDetails = () => { icon={} > diff --git a/apps/studio/components/interfaces/Functions/FunctionsEmptyState.tsx b/apps/studio/components/interfaces/Functions/FunctionsEmptyState.tsx index f2ac461b69aa9..a89cd1c85a0e4 100644 --- a/apps/studio/components/interfaces/Functions/FunctionsEmptyState.tsx +++ b/apps/studio/components/interfaces/Functions/FunctionsEmptyState.tsx @@ -11,6 +11,7 @@ import { ResourceList } from 'components/ui/Resource/ResourceList' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state' import { AiIconAnimation, @@ -236,7 +237,9 @@ export const FunctionsEmptyStateLocal = () => { value="supabase functions new hello-world" />

- +
@@ -259,7 +262,9 @@ supabase start # start the supabase stack supabase functions serve # start the Functions watcher`.trim()} />
- +
@@ -285,7 +290,9 @@ curl --request POST 'http://localhost:54321/functions/v1/hello-world' \\ --data '{ "name":"Functions" }'`.trim()} />
- + @@ -306,7 +313,7 @@ curl --request POST 'http://localhost:54321/functions/v1/hello-world' \\ on providers like Fly.io, Digital Ocean, or AWS.

- + @@ -383,7 +390,7 @@ export const FunctionsSecretsEmptyStateLocal = () => {
- + diff --git a/apps/studio/components/interfaces/Functions/TerminalInstructions.tsx b/apps/studio/components/interfaces/Functions/TerminalInstructions.tsx index 363fd7c1056fe..edcd5584372fa 100644 --- a/apps/studio/components/interfaces/Functions/TerminalInstructions.tsx +++ b/apps/studio/components/interfaces/Functions/TerminalInstructions.tsx @@ -9,6 +9,7 @@ import { useAccessTokensQuery } from 'data/access-tokens/access-tokens-query' import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query' +import { DOCS_URL } from 'lib/constants' import { Button, CollapsibleContent_Shadcn_, @@ -140,7 +141,7 @@ export const TerminalInstructions = forwardRef<

- + @@ -100,11 +97,7 @@ export const NewProjectPanel = () => { type="default" asChild > - + About Auth @@ -136,11 +129,7 @@ export const NewProjectPanel = () => { type="default" asChild > - + About Storage @@ -173,7 +162,7 @@ export const NewProjectPanel = () => { asChild > @@ -206,11 +195,7 @@ export const NewProjectPanel = () => { type="default" asChild > - + About Realtime @@ -229,7 +214,7 @@ export const NewProjectPanel = () => {

Connecting to your new project

Interact with your database through the{' '} - + Supabase client libraries {' '} with your API keys. @@ -244,11 +229,7 @@ export const NewProjectPanel = () => { View API settings diff --git a/apps/studio/components/interfaces/Home/ServiceStatus.tsx b/apps/studio/components/interfaces/Home/ServiceStatus.tsx index 1481e45a357ac..a0c6dc343e4f2 100644 --- a/apps/studio/components/interfaces/Home/ServiceStatus.tsx +++ b/apps/studio/components/interfaces/Home/ServiceStatus.tsx @@ -13,6 +13,7 @@ import { } from 'data/service-status/service-status-query' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Button, InfoIcon, @@ -213,7 +214,7 @@ export const ServiceStatus = () => { { name: 'Edge Functions', error: undefined, - docsUrl: 'https://supabase.com/docs/guides/functions/troubleshooting', + docsUrl: `${DOCS_URL}/guides/functions/troubleshooting`, isLoading, isHealthy: !!edgeFunctionsStatus?.healthy, status: edgeFunctionsStatus?.healthy diff --git a/apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStartedSection.tsx b/apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStartedSection.tsx index c567f0d3714fd..4771b751fb664 100644 --- a/apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStartedSection.tsx +++ b/apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStartedSection.tsx @@ -20,7 +20,7 @@ import { useTablesQuery } from 'data/tables/tables-query' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' 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 { AiIconAnimation, @@ -167,7 +167,7 @@ export function GettingStartedSection({ actions: [ { 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', }, { @@ -192,7 +192,7 @@ export function GettingStartedSection({ actions: [ { 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', }, { @@ -262,7 +262,7 @@ export function GettingStartedSection({ actions: [ { label: 'Read docs', - href: 'https://supabase.com/docs/guides/auth', + href: `${DOCS_URL}/guides/auth`, variant: 'default', }, ], @@ -426,7 +426,7 @@ export function GettingStartedSection({ actions: [ { label: 'Read docs', - href: 'https://supabase.com/docs/guides/auth', + href: `${DOCS_URL}/guides/auth`, variant: 'default', }, ], diff --git a/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx b/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx index 48cad4cd2788a..294aecd09b8f6 100644 --- a/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx +++ b/apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx @@ -12,6 +12,7 @@ import { } from 'data/service-status/service-status-query' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { InfoIcon, PopoverContent_Shadcn_, PopoverTrigger_Shadcn_, Popover_Shadcn_, cn } from 'ui' /** @@ -200,7 +201,7 @@ export const ServiceStatus = () => { { name: 'Edge Functions', error: undefined, - docsUrl: 'https://supabase.com/docs/guides/functions/troubleshooting', + docsUrl: `${DOCS_URL}/guides/functions/troubleshooting`, isLoading, isHealthy: !!edgeFunctionsStatus?.healthy, status: edgeFunctionsStatus?.healthy diff --git a/apps/studio/components/interfaces/HomeNew/TopSection.tsx b/apps/studio/components/interfaces/HomeNew/TopSection.tsx index 0d44224947a6a..ecdc0167b6690 100644 --- a/apps/studio/components/interfaces/HomeNew/TopSection.tsx +++ b/apps/studio/components/interfaces/HomeNew/TopSection.tsx @@ -5,6 +5,7 @@ import { ProjectPausedState } from 'components/layouts/ProjectLayout/PausedState import { ComputeBadgeWrapper } from 'components/ui/ComputeBadgeWrapper' import { InlineLink } from 'components/ui/InlineLink' import { ProjectUpgradeFailedBanner } from 'components/ui/ProjectUpgradeFailedBanner' +import { DOCS_URL } from 'lib/constants' import { ReactFlowProvider } from 'reactflow' import { Badge, cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { InstanceConfiguration } from '../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration' @@ -54,7 +55,7 @@ export const TopSection = ({ This project is using Postgres with OrioleDB which is currently in preview and not suitable for production workloads. View our{' '} - + documentation {' '} for all limitations. diff --git a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx index 2e10655b7f4d8..e95efa48267d4 100644 --- a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx +++ b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx @@ -4,7 +4,7 @@ import Image from 'next/image' import { ComponentType, ReactNode } from 'react' 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 { UpgradeDatabaseAlert } from '../Queues/UpgradeDatabaseAlert' import { WRAPPERS } from '../Wrappers/Wrappers.constants' @@ -177,7 +177,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [ ), description: 'Application level encryption for your project', - docsUrl: 'https://supabase.com/docs', + docsUrl: DOCS_URL, author: authorSupabase, navigation: [ { @@ -221,7 +221,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [ ), description: '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, requiredExtensions: [], navigation: [ @@ -275,7 +275,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [ /> ), description: 'Run GraphQL queries through our interactive in-browser IDE', - docsUrl: 'https://supabase.com/docs', + docsUrl: DOCS_URL, author: authorSupabase, navigation: [ { diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx index 7a0575c6da2f3..7c90a3ac26470 100644 --- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx +++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx @@ -10,6 +10,7 @@ import { DocsButton } from 'components/ui/DocsButton' import { useVaultSecretsQuery } from 'data/vault/vault-secrets-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import type { VaultSecret } from 'types' import { Button, @@ -127,7 +128,7 @@ export const SecretsManagement = () => { > Refresh - + { item.name === lint.name)?.docsLink || - 'https://supabase.com/docs/guides/database/database-linter' + `${DOCS_URL}/guides/database/database-linter` } target="_blank" rel="noreferrer" diff --git a/apps/studio/components/interfaces/Linter/Linter.utils.tsx b/apps/studio/components/interfaces/Linter/Linter.utils.tsx index 0b114eb79fcf1..84d512d441ee4 100644 --- a/apps/studio/components/interfaces/Linter/Linter.utils.tsx +++ b/apps/studio/components/interfaces/Linter/Linter.utils.tsx @@ -14,6 +14,7 @@ import Link from 'next/link' import { LINTER_LEVELS, LintInfo } from 'components/interfaces/Linter/Linter.constants' import { LINT_TYPES, Lint } from 'data/lint/lint-query' +import { DOCS_URL } from 'lib/constants' import { Badge, Button } from 'ui' export const lintInfoMap: LintInfo[] = [ @@ -24,8 +25,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/database/indexes?schema=${metadata?.schema}`, linkText: 'Create an index', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0001_unindexed_foreign_keys', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0001_unindexed_foreign_keys`, category: 'performance', }, { @@ -34,8 +34,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/editor`, linkText: 'View table', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0002_auth_users_exposed', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0002_auth_users_exposed`, category: 'security', }, { @@ -44,8 +43,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/policies`, linkText: 'View policies', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0003_auth_rls_initplan', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0003_auth_rls_initplan`, category: 'performance', }, { @@ -54,8 +52,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/editor`, linkText: 'View table', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0004_no_primary_key', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0004_no_primary_key`, category: 'performance', }, { @@ -65,8 +62,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`, linkText: 'View index', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0005_unused_index', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0005_unused_index`, category: 'performance', }, { @@ -76,8 +72,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, linkText: 'View policies', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0006_multiple_permissive_policies', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0006_multiple_permissive_policies`, category: 'performance', }, { @@ -87,8 +82,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, linkText: 'View policies', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0007_policy_exists_rls_disabled', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0007_policy_exists_rls_disabled`, category: 'security', }, { @@ -98,8 +92,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, linkText: 'View table', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0008_rls_enabled_no_policy', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0008_rls_enabled_no_policy`, category: 'security', }, { @@ -109,8 +102,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/database/indexes?schema=${metadata?.schema}&table=${metadata?.name}`, linkText: 'View index', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0009_duplicate_index', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0009_duplicate_index`, category: 'performance', }, { @@ -118,10 +110,9 @@ export const lintInfoMap: LintInfo[] = [ title: 'Security Definer View', icon: , 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', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view`, category: 'security', }, { @@ -131,8 +122,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/database/functions?schema=${metadata?.schema}&search=${metadata?.name}`, linkText: 'View functions', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0011_function_search_path_mutable', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0011_function_search_path_mutable`, category: 'security', }, { @@ -142,8 +132,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/auth/policies?schema=${metadata?.schema}&search=${metadata?.name}`, linkText: 'View policies', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0013_rls_disabled_in_public', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0013_rls_disabled_in_public`, category: 'security', }, { @@ -153,8 +142,7 @@ export const lintInfoMap: LintInfo[] = [ link: ({ projectRef, metadata }) => `/project/${projectRef}/database/extensions?filter=${metadata?.name}`, linkText: 'View extension', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0014_extension_in_public', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0014_extension_in_public`, category: 'security', }, { @@ -163,7 +151,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/providers`, 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', }, { @@ -172,7 +160,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/providers`, 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', }, { @@ -181,30 +169,25 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/policies`, linkText: 'View policies', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?queryGroups=lint&lint=0015_rls_references_user_metadata', + docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0015_rls_references_user_metadata`, category: 'security', }, { name: 'materialized_view_in_api', title: 'Materialized View in API', icon: , - link: () => - `https://supabase.com/docs/guides/database/database-advisors?lint=0016_materialized_view_in_api`, + link: () => `${DOCS_URL}/guides/database/database-advisors?lint=0016_materialized_view_in_api`, linkText: 'View docs', - docsLink: - 'https://supabase.com/docs/guides/database/database-advisors?lint=0016_materialized_view_in_api', + docsLink: `${DOCS_URL}/guides/database/database-advisors?lint=0016_materialized_view_in_api`, category: 'security', }, { name: 'foreign_table_in_api', title: 'Foreign Table in API', icon: , - link: () => - `https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api`, + link: () => `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`, linkText: 'View docs', - docsLink: - 'https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api', + docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`, category: 'security', }, { @@ -212,10 +195,9 @@ export const lintInfoMap: LintInfo[] = [ title: 'Unsupported reg types', icon: , 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', - docsLink: - 'https://supabase.com/docs/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint', + docsLink: `${DOCS_URL}/guides/database/database-advisors?lint=0018_unsupported_reg_types&queryGroups=lint`, category: 'security', }, { @@ -224,7 +206,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/database/settings`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/platform/ssl-enforcement', + docsLink: `${DOCS_URL}/guides/platform/ssl-enforcement`, category: 'security', }, { @@ -233,7 +215,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/database/settings`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/platform/network-restrictions', + docsLink: `${DOCS_URL}/guides/platform/network-restrictions`, category: 'security', }, { @@ -242,7 +224,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, 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', }, { @@ -251,7 +233,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/database/backups/pitr`, 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', }, { @@ -260,8 +242,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, linkText: 'View settings', - docsLink: - 'https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection', + docsLink: `${DOCS_URL}/guides/auth/password-security#password-strength-and-leaked-password-protection`, category: 'security', }, { @@ -270,7 +251,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa', + docsLink: `${DOCS_URL}/guides/auth/auth-mfa`, category: 'security', }, { @@ -279,7 +260,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/auth/password-security', + docsLink: `${DOCS_URL}/guides/auth/password-security`, category: 'security', }, { @@ -288,7 +269,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/settings/api`, 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', }, { @@ -297,7 +278,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa', + docsLink: `${DOCS_URL}/guides/auth/auth-mfa`, category: 'security', }, { @@ -306,7 +287,7 @@ export const lintInfoMap: LintInfo[] = [ icon: , link: ({ projectRef }) => `/project/${projectRef}/settings/infrastructure`, linkText: 'View settings', - docsLink: 'https://supabase.com/docs/guides/platform/upgrading', + docsLink: `${DOCS_URL}/guides/platform/upgrading`, category: 'security', }, ] diff --git a/apps/studio/components/interfaces/Linter/LinterPageFooter.tsx b/apps/studio/components/interfaces/Linter/LinterPageFooter.tsx index 76bb8b6a3d102..8601f60fafc03 100644 --- a/apps/studio/components/interfaces/Linter/LinterPageFooter.tsx +++ b/apps/studio/components/interfaces/Linter/LinterPageFooter.tsx @@ -1,6 +1,7 @@ -import { X } from 'lucide-react' import { LOCAL_STORAGE_KEYS } from 'common' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' +import { DOCS_URL } from 'lib/constants' +import { X } from 'lucide-react' import { Button, cn } from 'ui' import { Markdown } from '../Markdown' @@ -75,8 +76,8 @@ const LinterPageFooter = ({

Inspect your database for potential issues

)} diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx index 5bffac5f3cd38..6596c8610701e 100644 --- a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx +++ b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx @@ -6,9 +6,9 @@ import { toast } from 'sonner' import { z } from 'zod' import { useParams } from 'common' -import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query' - import { DocsButton } from 'components/ui/DocsButton' +import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query' +import { DOCS_URL } from 'lib/constants' import { Button, Form_Shadcn_, @@ -533,7 +533,7 @@ export function LogDrainDestinationSheetForm({ } diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/BillingBreakdown.constants.ts b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/BillingBreakdown.constants.ts index 2b1150e1acef1..95b8b36bf29b4 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/BillingBreakdown.constants.ts +++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/BillingBreakdown.constants.ts @@ -1,4 +1,5 @@ import { PricingMetric } from 'data/analytics/org-daily-stats-query' +import { DOCS_URL } from 'lib/constants' 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.', docLink: { 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`, }, }, { diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx index df14738bfd77e..a57b997751d92 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx @@ -2,6 +2,7 @@ import Link from 'next/link' import { ComputeUsageMetric, PricingMetric } from 'data/analytics/org-daily-stats-query' import type { OrgUsageResponse } from 'data/usage/org-usage-query' +import { DOCS_URL } from 'lib/constants' import { formatCurrency } from 'lib/helpers' import { ChevronRight } from 'lucide-react' import { useMemo } from 'react' @@ -74,7 +75,7 @@ export const ComputeMetric = ({ Each Preview branch is a separate environment with all Supabase services (Database, Auth, Storage, etc.).{' '} @@ -87,7 +88,7 @@ export const ComputeMetric = ({ active, it incurs compute costs based on the compute size of your project. Paused projects do not incur compute costs.{' '} diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx index e9b43d2dc6505..b11a717a70334 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx @@ -2,70 +2,50 @@ import Link from 'next/link' import AlertError from 'components/ui/AlertError' import ShimmeringLoader from 'components/ui/ShimmeringLoader' +import { PricingMetric } from 'data/analytics/org-daily-stats-query' import { UpcomingInvoiceResponse, useOrgUpcomingInvoiceQuery, } from 'data/invoices/org-invoice-upcoming-query' +import { DOCS_URL } from 'lib/constants' import { formatCurrency } from 'lib/helpers' +import React from 'react' 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 { billingMetricUnit, formatUsage } from '../helpers' export interface UpcomingInvoiceProps { slug?: string } const usageBillingDocsLink: { [K in PricingMetric]?: string } = { - [PricingMetric.MONTHLY_ACTIVE_USERS]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users', - [PricingMetric.MONTHLY_ACTIVE_SSO_USERS]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users-sso', - [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.CACHED_EGRESS]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/egress', - - [PricingMetric.FUNCTION_INVOCATIONS]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/edge-function-invocations', - - [PricingMetric.STORAGE_SIZE]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/storage-size', - [PricingMetric.STORAGE_IMAGES_TRANSFORMED]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/storage-image-transformations', - - [PricingMetric.REALTIME_MESSAGE_COUNT]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/realtime-messages', - [PricingMetric.REALTIME_PEAK_CONNECTIONS]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/realtime-peak-connections', - - [PricingMetric.CUSTOM_DOMAIN]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/custom-domains', - [PricingMetric.IPV4]: 'https://supabase.com/docs/guides/platform/manage-your-usage/ipv4', - [PricingMetric.PITR_7]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', - [PricingMetric.PITR_14]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', - [PricingMetric.PITR_28]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/point-in-time-recovery', - [PricingMetric.DISK_SIZE_GB_HOURS_GP3]: - 'https://supabase.com/docs/guides/platform/manage-your-usage/disk-size', - [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', + [PricingMetric.MONTHLY_ACTIVE_USERS]: `${DOCS_URL}/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_THIRD_PARTY_USERS]: `${DOCS_URL}/guides/platform/manage-your-usage/monthly-active-users-third-party`, + [PricingMetric.AUTH_MFA_PHONE]: `${DOCS_URL}/guides/platform/manage-your-usage/advanced-mfa-phone`, + + [PricingMetric.EGRESS]: `${DOCS_URL}/guides/platform/manage-your-usage/egress`, + [PricingMetric.CACHED_EGRESS]: `${DOCS_URL}/guides/platform/manage-your-usage/egress`, + + [PricingMetric.FUNCTION_INVOCATIONS]: `${DOCS_URL}/guides/platform/manage-your-usage/edge-function-invocations`, + + [PricingMetric.STORAGE_SIZE]: `${DOCS_URL}/guides/platform/manage-your-usage/storage-size`, + [PricingMetric.STORAGE_IMAGES_TRANSFORMED]: `${DOCS_URL}/guides/platform/manage-your-usage/storage-image-transformations`, + + [PricingMetric.REALTIME_MESSAGE_COUNT]: `${DOCS_URL}/guides/platform/manage-your-usage/realtime-messages`, + [PricingMetric.REALTIME_PEAK_CONNECTIONS]: `${DOCS_URL}/guides/platform/manage-your-usage/realtime-peak-connections`, + + [PricingMetric.CUSTOM_DOMAIN]: `${DOCS_URL}/guides/platform/manage-your-usage/custom-domains`, + [PricingMetric.IPV4]: `${DOCS_URL}/guides/platform/manage-your-usage/ipv4`, + [PricingMetric.PITR_7]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`, + [PricingMetric.PITR_14]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`, + [PricingMetric.PITR_28]: `${DOCS_URL}/guides/platform/manage-your-usage/point-in-time-recovery`, + [PricingMetric.DISK_SIZE_GB_HOURS_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`, + [PricingMetric.DISK_SIZE_GB_HOURS_IO2]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-size`, + [PricingMetric.DISK_IOPS_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-iops`, + [PricingMetric.DISK_IOPS_IO2]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-iops`, + [PricingMetric.DISK_THROUGHPUT_GP3]: `${DOCS_URL}/guides/platform/manage-your-usage/disk-throughput`, + [PricingMetric.LOG_DRAIN]: `${DOCS_URL}/guides/platform/manage-your-usage/log-drains`, } const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { @@ -147,7 +127,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { compute costs starting at $10/month, independent of activity. See{' '} docs @@ -167,9 +147,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { Compute, Disk Size, provisioned Disk IOPS, provisioned Disk Throughput, and IPv4. See{' '} docs @@ -200,9 +178,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { See{' '} docs diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/CostControl.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/CostControl.tsx index 652d796055570..edf665e233eb9 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/CostControl.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/CostControl.tsx @@ -12,17 +12,16 @@ import { } from 'components/layouts/Scaffold' import AlertError from 'components/ui/AlertError' import NoPermission from 'components/ui/NoPermission' +import PartnerIcon from 'components/ui/PartnerIcon' import { PARTNER_TO_NAME } from 'components/ui/PartnerManagedResource' import ShimmeringLoader from 'components/ui/ShimmeringLoader' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' 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 { useOrgSettingsPageStateSnapshot } from 'state/organization-settings' import { Alert, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' - -import PartnerIcon from 'components/ui/PartnerIcon' import ProjectUpdateDisabledTooltip from '../ProjectUpdateDisabledTooltip' import SpendCapSidePanel from './SpendCapSidePanel' @@ -78,7 +77,7 @@ const CostControl = ({}: CostControlProps) => {

More information

diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/SpendCapSidePanel.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/SpendCapSidePanel.tsx index 367a5480ec65e..6051d14608b12 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/SpendCapSidePanel.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/CostControl/SpendCapSidePanel.tsx @@ -10,7 +10,7 @@ import Table from 'components/to-be-cleaned/Table' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation' 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 { pricing } from 'shared-data/pricing' import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings' @@ -108,7 +108,7 @@ const SpendCapSidePanel = () => {

Spend cap

)}
@@ -139,7 +138,7 @@ export const Restriction = () => { )} @@ -179,7 +178,7 @@ export const Restriction = () => { )} @@ -217,7 +216,7 @@ export const Restriction = () => { )} diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx index 279e1240dcf14..ebce8bcb1bef6 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx @@ -19,7 +19,12 @@ import { useConfirmPendingSubscriptionChangeMutation } from 'data/subscriptions/ import { useOrgSubscriptionUpdateMutation } from 'data/subscriptions/org-subscription-update-mutation' import { SubscriptionTier } from 'data/subscriptions/types' 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 { useTheme } from 'next-themes' import { plans as subscriptionsPlans } from 'shared-data/plans' @@ -351,9 +356,7 @@ export const SubscriptionPlanUpdateDialog = ({ Credits; additional projects start at $10 /month regardless of usage.{' '} Learn more @@ -589,7 +592,7 @@ export const SubscriptionPlanUpdateDialog = ({ /month regardless of usage.{' '} diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx index e9c9a2b7a9f6f..d07d7a2db4b5c 100644 --- a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx +++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceCreateNewOrg.tsx @@ -1,20 +1,22 @@ -import { useAwsManagedOrganizationCreateMutation } from '../../../../data/organizations/organization-create-mutation' -import { toast } from 'sonner' +import Link from 'next/link' +import { useRouter } from 'next/router' import { SubmitHandler } from 'react-hook-form' -import NewAwsMarketplaceOrgForm, { - CREATE_AWS_MANAGED_ORG_FORM_ID, - NewMarketplaceOrgForm, -} from './NewAwsMarketplaceOrgForm' +import { toast } from 'sonner' + +import { useAwsManagedOrganizationCreateMutation } from 'data/organizations/organization-create-mutation' +import { DOCS_URL } from 'lib/constants' +import { Button } from 'ui' import { ScaffoldSection, ScaffoldSectionContent, ScaffoldSectionDetail, } from '../../../layouts/Scaffold' -import Link from 'next/link' -import { Button } from 'ui' -import { useRouter } from 'next/router' import AwsMarketplaceAutoRenewalWarning from './AwsMarketplaceAutoRenewalWarning' import { CloudMarketplaceOnboardingInfo } from './cloud-marketplace-query' +import NewAwsMarketplaceOrgForm, { + CREATE_AWS_MANAGED_ORG_FORM_ID, + NewMarketplaceOrgForm, +} from './NewAwsMarketplaceOrgForm' interface Props { onboardingInfo?: CloudMarketplaceOnboardingInfo | undefined @@ -61,11 +63,7 @@ const AwsMarketplaceCreateNewOrg = ({ onboardingInfo }: Props) => {

You can read more on billing through AWS in our {''} {/*TODO(thomas): Update docs link once the new docs exist*/} - + Billing Docs.

diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx index 7b25463cd948e..8baf88672b236 100644 --- a/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx +++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/AwsMarketplaceLinkExistingOrg.tsx @@ -1,5 +1,4 @@ import { zodResolver } from '@hookform/resolvers/zod' -import { RadioGroupCard, RadioGroupCardItem } from '@ui/components/radio-group-card' import { cn } from '@ui/lib/utils' import { Boxes, ChevronRight } from 'lucide-react' import Link from 'next/link' @@ -7,6 +6,13 @@ import { useRouter } from 'next/router' import { useMemo, useState } from 'react' import { SubmitHandler, useForm } from 'react-hook-form' 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 { Button, Collapsible_Shadcn_, @@ -17,10 +23,6 @@ import { Skeleton, } from 'ui' 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 { ScaffoldSection, ScaffoldSectionContent, @@ -139,11 +141,7 @@ const AwsMarketplaceLinkExistingOrg = ({

You can read more on billing through AWS in our {''} {/*TODO(thomas): Update docs link once the new docs exist*/} - + Billing Docs.

diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthSecrets/OAuthSecrets.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthSecrets/OAuthSecrets.tsx index 5cc983beeb9b5..2a770aa08ffe8 100644 --- a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthSecrets/OAuthSecrets.tsx +++ b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthSecrets/OAuthSecrets.tsx @@ -8,6 +8,7 @@ import { useClientSecretCreateMutation } from 'data/oauth-secrets/client-secret- import { CreatedSecret, useClientSecretsQuery } from 'data/oauth-secrets/client-secrets-query' import { OAuthApp } from 'data/oauth/oauth-apps-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import { Alert_Shadcn_, AlertTitle_Shadcn_, InfoIcon } from 'ui' import { SecretRow } from './SecretRow' @@ -42,7 +43,9 @@ export const OAuthSecrets = ({ selectedApp }: Props) => { Client secrets For handling callbacks in the OAuth 2.0 flow. Learn more{' '} - + here . diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx index 3da2460784681..287f8ec0b9447 100644 --- a/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx +++ b/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx @@ -11,6 +11,7 @@ import { } from 'data/oauth/oauth-app-create-mutation' import { useOAuthAppUpdateMutation } from 'data/oauth/oauth-app-update-mutation' import type { OAuthApp } from 'data/oauth/oauth-apps-query' +import { DOCS_URL } from 'lib/constants' import { isValidHttpUrl, uuidv4 } from 'lib/helpers' import { uploadAttachment } from 'lib/upload' import { @@ -349,7 +350,7 @@ export const PublishAppSidePanel = ({ projects. - + diff --git a/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx b/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx index 66d036610fe17..3d8359288c802 100644 --- a/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx +++ b/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx @@ -12,6 +12,7 @@ import { useSSOConfigCreateMutation } from 'data/sso/sso-config-create-mutation' import { useOrgSSOConfigQuery } from 'data/sso/sso-config-query' import { useSSOConfigUpdateMutation } from 'data/sso/sso-config-update-mutation' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -219,7 +220,7 @@ export const SSOConfig = () => { Enable and configure SSO for your organization. Learn more about SSO{' '} here diff --git a/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx b/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx index a1c756df52dff..8c420f7500869 100644 --- a/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx +++ b/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx @@ -17,6 +17,7 @@ import { useHasAccessToProjectLevelPermissions } from 'data/subscriptions/org-su import { doPermissionsCheck, useGetPermissions } from 'hooks/misc/useCheckPermissions' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { useProfile } from 'lib/profile' import { Button, @@ -300,7 +301,7 @@ export const InviteMemberButton = () => {
)} - +
diff --git a/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx b/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx index c65e22d85a975..d57961890d567 100644 --- a/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx +++ b/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx @@ -9,15 +9,15 @@ import { executeSql } from 'data/sql/execute-sql-query' import { DbQueryHook } from 'hooks/analytics/useDbQuery' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' 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 { Button, LoadingLine, cn } from 'ui' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import { Markdown } from '../Markdown' import { PresetHookResult } from '../Reports/Reports.utils' -import { QueryPerformanceMetrics } from './QueryPerformanceMetrics' import { QueryPerformanceFilterBar } from './QueryPerformanceFilterBar' import { QueryPerformanceGrid } from './QueryPerformanceGrid' +import { QueryPerformanceMetrics } from './QueryPerformanceMetrics' interface QueryPerformanceProps { queryHitRate: PresetHookResult @@ -100,7 +100,7 @@ export const QueryPerformance = ({

How is this report generated?

@@ -108,8 +108,8 @@ export const QueryPerformance = ({

Inspect your database for potential issues

diff --git a/apps/studio/components/interfaces/Realtime/Inspector/ChooseChannelPopover/index.tsx b/apps/studio/components/interfaces/Realtime/Inspector/ChooseChannelPopover/index.tsx index 4851d41d6ea17..3d16108accc52 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/ChooseChannelPopover/index.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/ChooseChannelPopover/index.tsx @@ -9,6 +9,7 @@ import { DocsButton } from 'components/ui/DocsButton' import { getTemporaryAPIKey } from 'data/api-keys/temp-api-keys-query' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { Button, FormControl_Shadcn_, @@ -135,7 +136,7 @@ export const ChooseChannelPopover = ({ config, onChangeConfig }: ChooseChannelPo target="_blank" rel="noreferrer" className="underline hover:text-foreground transition" - href="https://supabase.com/docs/guides/realtime/concepts#channels" + href={`${DOCS_URL}/guides/realtime/concepts#channels`} > our docs @@ -173,7 +174,7 @@ export const ChooseChannelPopover = ({ config, onChangeConfig }: ChooseChannelPo diff --git a/apps/studio/components/interfaces/Realtime/Inspector/MessagesTable.tsx b/apps/studio/components/interfaces/Realtime/Inspector/MessagesTable.tsx index 7fc0eb6271e02..f104df260aef2 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/MessagesTable.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/MessagesTable.tsx @@ -12,6 +12,7 @@ import ShimmerLine from 'components/ui/ShimmerLine' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { Button, IconBroadcast, IconDatabaseChanges, IconPresence, cn } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns' import MessageSelection from './MessageSelection' @@ -98,7 +99,7 @@ const NoResultAlert = ({

Not sure what to do?

Browse our documentation

- + diff --git a/apps/studio/components/interfaces/Realtime/Inspector/NoChannelEmptyState.tsx b/apps/studio/components/interfaces/Realtime/Inspector/NoChannelEmptyState.tsx index 342aca9b110e9..74ee5a9eec1b1 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/NoChannelEmptyState.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/NoChannelEmptyState.tsx @@ -1,4 +1,5 @@ import { DocsButton } from 'components/ui/DocsButton' +import { DOCS_URL } from 'lib/constants' import { cn } from 'ui' const NoChannelEmptyState = () => { @@ -18,7 +19,7 @@ const NoChannelEmptyState = () => {

Not sure what to do?

Browse our documentation

- + ) diff --git a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/index.tsx b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/index.tsx index 55f0fd2a56619..1e5ac85c02584 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/index.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/index.tsx @@ -5,6 +5,7 @@ import { Dispatch, SetStateAction, useState } from 'react' import { useParams } from 'common' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { Badge, Button, @@ -180,7 +181,7 @@ export const RealtimeFilterPopover = ({ config, onChangeConfig }: RealtimeFilter className="underline" target="_blank" rel="noreferrer" - href="https://supabase.com/docs/guides/realtime/postgres-changes#available-filters" + href={`${DOCS_URL}/guides/realtime/postgres-changes#available-filters`} > our docs diff --git a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx index befa9621cfb63..139998920ee46 100644 --- a/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx +++ b/apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx @@ -10,6 +10,7 @@ import { User, useUsersInfiniteQuery } from 'data/auth/users-infinite-query' import { useCustomAccessTokenHookDetails } from 'hooks/misc/useCustomAccessTokenHookDetails' import { useLocalStorage } from 'hooks/misc/useLocalStorage' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state' import { ResponseError } from 'types' import { @@ -393,10 +394,7 @@ const UserImpersonationSelector = () => { 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. Learn more about MFA{' '} - - here - - . + here. diff --git a/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx b/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx index 935e6d6c9c7e1..c531a7df6e6df 100644 --- a/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx +++ b/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx @@ -5,6 +5,7 @@ import { useState } from 'react' import type { ModalProps } from '@ui/components/Modal/Modal' import TwoOptionToggle from 'components/ui/TwoOptionToggle' +import { DOCS_URL } from 'lib/constants' import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2' import { Button, CodeBlock, Modal, Tabs } from 'ui' import { Markdown } from '../Markdown' @@ -104,7 +105,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => {
diff --git a/apps/studio/components/interfaces/Settings/Addons/Addons.tsx b/apps/studio/components/interfaces/Settings/Addons/Addons.tsx index 10bdd198f741f..bb72a78db3bdd 100644 --- a/apps/studio/components/interfaces/Settings/Addons/Addons.tsx +++ b/apps/studio/components/interfaces/Settings/Addons/Addons.tsx @@ -36,7 +36,7 @@ import { useSelectedProjectQuery, } from 'hooks/misc/useSelectedProject' 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 { useAddonsPagePanel } from 'state/addons-page' import { Alert, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' @@ -180,7 +180,7 @@ export const Addons = () => {

More information

@@ -192,7 +192,7 @@ export const Addons = () => {
@@ -347,7 +347,7 @@ export const Addons = () => {

More information

@@ -424,7 +424,7 @@ export const Addons = () => {

More information

@@ -548,7 +548,7 @@ export const Addons = () => {

More information

diff --git a/apps/studio/components/interfaces/Settings/Addons/CustomDomainSidePanel.tsx b/apps/studio/components/interfaces/Settings/Addons/CustomDomainSidePanel.tsx index 7e035c727bc5c..e400dd79e838e 100644 --- a/apps/studio/components/interfaces/Settings/Addons/CustomDomainSidePanel.tsx +++ b/apps/studio/components/interfaces/Settings/Addons/CustomDomainSidePanel.tsx @@ -11,6 +11,7 @@ import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query' import type { AddonVariantId } from 'data/subscriptions/types' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { formatCurrency } from 'lib/helpers' import { useAddonsPagePanel } from 'state/addons-page' import { @@ -119,7 +120,7 @@ const CustomDomainSidePanel = () => {

Custom domains

{ipListLoading ? ( diff --git a/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx b/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx index 47e7700820fd5..cbd149e19ef3d 100644 --- a/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx +++ b/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx @@ -20,6 +20,7 @@ import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, @@ -150,7 +151,9 @@ export const ConnectionPooling = () => { Shared/Dedicated Pooler )}
- +
} footer={ @@ -277,7 +280,9 @@ export const ConnectionPooling = () => {

Please refer to our{' '} - + documentation {' '} to find out more. diff --git a/apps/studio/components/interfaces/Settings/Database/DatabaseReadOnlyAlert.tsx b/apps/studio/components/interfaces/Settings/Database/DatabaseReadOnlyAlert.tsx index a5e4a9e7beb3a..79beef58d7c54 100644 --- a/apps/studio/components/interfaces/Settings/Database/DatabaseReadOnlyAlert.tsx +++ b/apps/studio/components/interfaces/Settings/Database/DatabaseReadOnlyAlert.tsx @@ -5,6 +5,7 @@ import { useState } from 'react' import { useResourceWarningsQuery } from 'data/usage/resource-warnings-query' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' import ConfirmDisableReadOnlyModeModal from './DatabaseSettings/ConfirmDisableReadOnlyModal' @@ -62,7 +63,7 @@ export const DatabaseReadOnlyAlert = () => {

diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx index a57804265de2f..4ec7c60267d2c 100644 --- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx +++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx @@ -5,6 +5,7 @@ import { Button, Form, Input, Modal, Tooltip, TooltipContent, TooltipTrigger } f import InformationBox from 'components/ui/InformationBox' import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query' import { useNetworkRestrictionsApplyMutation } from 'data/network-restrictions/network-retrictions-apply-mutation' +import { DOCS_URL } from 'lib/constants' import { HelpCircle } from 'lucide-react' import { checkIfPrivate, @@ -165,7 +166,7 @@ const AddRestrictionModal = ({ 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." urlLabel="Learn more" - url="https://supabase.com/docs/guides/platform/network-restrictions#limitations" + url={`${DOCS_URL}/guides/platform/network-restrictions#limitations`} />
diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx index 65455dd2ef49f..070aa1788e432 100644 --- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx +++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx @@ -12,6 +12,7 @@ import ShimmeringLoader from 'components/ui/ShimmeringLoader' import { useNetworkRestrictionsQuery } from 'data/network-restrictions/network-restrictions-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Badge, Button, @@ -109,7 +110,7 @@ const NetworkRestrictions = () => { description="Allow specific IP ranges to have access to your database." />
- + {!canUpdateNetworkRestrictions ? ( {

Which pooling mode should I use?

- +
diff --git a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx index 70092a729d447..570e054c8cfef 100644 --- a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx +++ b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx @@ -17,6 +17,7 @@ import { useSSLEnforcementUpdateMutation } from 'data/ssl-enforcement/ssl-enforc import { useCustomContent } from 'hooks/custom-content/useCustomContent' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { Alert, Button, Switch, Tooltip, TooltipContent, TooltipTrigger } from 'ui' const SSLConfiguration = () => { @@ -89,7 +90,7 @@ const SSLConfiguration = () => {
- +
{ @@ -67,7 +68,7 @@ const ComplianceConfig = () => { title="High Compliance Configuration" description="For projects storing and processing sensitive data (HIPAA)" /> - +
- +
@@ -363,7 +363,7 @@ const DeployNewReplicaPanel = ({ )} @@ -541,7 +541,7 @@ const DeployNewReplicaPanel = ({

Read more about{' '} { @@ -44,7 +46,7 @@ export const ObjectsToBeDroppedWarning = ({

diff --git a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx index 8f8cad5bedef3..47e7f318a0942 100644 --- a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx +++ b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx @@ -14,7 +14,7 @@ import { InlineLink } from 'components/ui/InlineLink' import { useProjectStorageConfigQuery } from 'data/config/project-storage-config-query' import { useBucketUpdateMutation } from 'data/storage/bucket-update-mutation' import { Bucket } from 'data/storage/buckets-query' -import { IS_PLATFORM } from 'lib/constants' +import { DOCS_URL, IS_PLATFORM } from 'lib/constants' import { Button, Dialog, @@ -267,7 +267,9 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro

Assets cached in the CDN may still be publicly accessible. You can consider{' '} - + purging the cache {' '} or moving your assets to a new bucket. diff --git a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.tsx b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.tsx index 3259f2cd36c02..4b013668ce2d7 100644 --- a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.tsx +++ b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.tsx @@ -6,6 +6,7 @@ import { POLICY_MODAL_VIEWS } from 'components/interfaces/Auth/Policies/Policies import PolicySelection from 'components/interfaces/Auth/Policies/PolicySelection' import PolicyTemplates from 'components/interfaces/Auth/Policies/PolicyTemplates' import { DocsButton } from 'components/ui/DocsButton' +import { DOCS_URL } from 'lib/constants' import { ChevronLeft } from 'lucide-react' import { Modal } from 'ui' import { @@ -184,7 +185,7 @@ const StoragePoliciesEditPolicyModal = ({ return (

{getTitle()}

- +
) } diff --git a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditor.tsx b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditor.tsx index b695460ab506d..6b200e675f9e6 100644 --- a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditor.tsx +++ b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesEditor.tsx @@ -3,6 +3,7 @@ import { Badge, Button, Checkbox, Modal } from 'ui' import { PolicyName, PolicyRoles } from 'components/interfaces/Auth/Policies/PolicyEditor' import SqlEditor from 'components/ui/SqlEditor' +import { DOCS_URL } from 'lib/constants' import { STORAGE_CLIENT_LIBRARY_MAPPINGS } from '../Storage.constants' import { deriveAllowedClientLibraryMethods } from '../Storage.utils' @@ -35,7 +36,7 @@ const PolicyAllowedOperations = ({ allowedOperations = [], onToggleOperation = (

Based on the operations you have selected, you can use the highlighted functions in the{' '} { Connect to your bucket using any S3-compatible service via the S3 protocol

- +
diff --git a/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx b/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx index bd0cfb22d806b..9e0f0836b5752 100644 --- a/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx +++ b/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx @@ -18,6 +18,7 @@ import { useProjectStorageConfigUpdateUpdateMutation } from 'data/config/project import { useBucketsQuery } from 'data/storage/buckets-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' +import { DOCS_URL } from 'lib/constants' import { formatBytes } from 'lib/helpers' import { Button, @@ -236,7 +237,9 @@ export const StorageSettings = () => { description={ <> Optimize and resize images on the fly.{' '} - + Learn more . @@ -274,7 +277,7 @@ export const StorageSettings = () => { Loading bucket information... )}{' '} - + Learn more . diff --git a/apps/studio/components/interfaces/Support/SupportForm.utils.tsx b/apps/studio/components/interfaces/Support/SupportForm.utils.tsx index 08737d0131227..0a8c7682d596a 100644 --- a/apps/studio/components/interfaces/Support/SupportForm.utils.tsx +++ b/apps/studio/components/interfaces/Support/SupportForm.utils.tsx @@ -7,6 +7,7 @@ import { type DocsSearchResult as Page, type DocsSearchResultSection as PageSection, } from 'common' +import { DOCS_URL } from 'lib/constants' import { uuidv4 } from 'lib/helpers' const SUPPORT_API_URL = process.env.NEXT_PUBLIC_SUPPORT_API_URL || '' @@ -96,7 +97,7 @@ export function generateLink(pageType: PageType, link: string): string { switch (pageType) { case PageType.Markdown: case PageType.Reference: - return `https://supabase.com/docs${link}` + return `${DOCS_URL}${link}` case PageType.Integration: return `https://supabase.com${link}` case PageType.GithubDiscussion: diff --git a/apps/studio/components/interfaces/Support/SupportFormV2.tsx b/apps/studio/components/interfaces/Support/SupportFormV2.tsx index b94e23d8e8a7a..23f571d3a55b7 100644 --- a/apps/studio/components/interfaces/Support/SupportFormV2.tsx +++ b/apps/studio/components/interfaces/Support/SupportFormV2.tsx @@ -29,6 +29,7 @@ import { useSendSupportTicketMutation } from 'data/feedback/support-ticket-send' import { useOrganizationsQuery } from 'data/organizations/organizations-query' import { getProjectDetail } from 'data/projects/project-detail-query' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' +import { DOCS_URL } from 'lib/constants' import { detectBrowser } from 'lib/helpers' import { useProfile } from 'lib/profile' import { useQueryState } from 'nuqs' @@ -648,9 +649,7 @@ export const SupportFormV2 = ({ )} Learn more diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx index 41fa34c9966c8..06a6c3f27d80f 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx @@ -18,6 +18,7 @@ import { import { useEnumeratedTypesQuery } from 'data/enumerated-types/enumerated-types-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useProtectedSchemas } from 'hooks/useProtectedSchemas' +import { DOCS_URL } from 'lib/constants' import type { Dictionary } from 'types' import { Button, Checkbox, Input, SidePanel, Toggle } from 'ui' import ActionBar from '../ActionBar' @@ -247,7 +248,7 @@ const ColumnEditor = ({ icon={} > diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx index 91496959b01e4..810f962e95399 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx @@ -18,6 +18,7 @@ import { useSchemasQuery } from 'data/database/schemas-query' import { useTablesQuery } from 'data/tables/tables-query' import { useQuerySchemaState } from 'hooks/misc/useSchemaQueryState' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { uuidv4 } from 'lib/helpers' import ActionBar from '../ActionBar' import { NUMERICAL_TYPES, TEXT_TYPES } from '../SidePanelEditor.constants' @@ -494,7 +495,7 @@ export const ForeignKeySelector = ({ label="Action if referenced row is removed" // @ts-ignore labelOptional={ - + } descriptionText={ <> diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.utils.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.utils.tsx index 8ffd77b6b2cc2..d601a0b490c3f 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.utils.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImport.utils.tsx @@ -5,6 +5,7 @@ import Link from 'next/link' import Papa from 'papaparse' import { toast } from 'sonner' +import { DOCS_URL } from 'lib/constants' import { tryParseJson } from 'lib/helpers' import { Button } from 'ui' import { @@ -182,7 +183,7 @@ export function flagInvalidFileImport(file: File): boolean {

For bulk data loading, we recommend doing so directly through the database.

) diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx index 1d60e546fc792..8c9dbacc7e58f 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx @@ -22,6 +22,7 @@ import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useUrlState } from 'hooks/ui/useUrlState' import { useProtectedSchemas } from 'hooks/useProtectedSchemas' +import { DOCS_URL } from 'lib/constants' import { useTableEditorStateSnapshot } from 'state/table-editor' import { Badge, Checkbox, Input, SidePanel } from 'ui' import { Admonition } from 'ui-patterns' @@ -334,7 +335,7 @@ export const TableEditor = ({ ) : ( @@ -352,7 +353,7 @@ export const TableEditor = ({ )} diff --git a/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx b/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx index 3ba765b5eab28..61bbe5881a7f1 100644 --- a/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx +++ b/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx @@ -1,5 +1,5 @@ import { fetchHandler } from 'data/fetchers' -import { BASE_PATH } from 'lib/constants' +import { BASE_PATH, DOCS_URL } from 'lib/constants' import { useCallback, useEffect, useState } from 'react' import { Button } from 'ui' @@ -47,7 +47,7 @@ export const ClockSkewBanner = () => { Your computer's clock appears to be inaccurate. This can cause issues with certain features.

diff --git a/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx b/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx index db1f0284c9361..2356d309900a6 100644 --- a/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx +++ b/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx @@ -1,5 +1,5 @@ import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types' -import { BASE_PATH } from 'lib/constants' +import { BASE_PATH, DOCS_URL } from 'lib/constants' import { ArrowUpRight, Book, BookOpen } from 'lucide-react' import SVG from 'react-inlinesvg' @@ -91,7 +91,7 @@ export const generateDocsMenu = ( { name: 'Guides', key: 'guides', - url: `https://supabase.com/docs`, + url: DOCS_URL, icon: , items: [], isExternal: true, @@ -99,7 +99,7 @@ export const generateDocsMenu = ( { name: 'API Reference', key: 'api-reference', - url: `https://supabase.com/docs/guides/api`, + url: `${DOCS_URL}/guides/api`, icon: , items: [], isExternal: true, diff --git a/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsx b/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsx index 76b488fc84587..f37b37a7a447d 100644 --- a/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsx +++ b/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsx @@ -18,6 +18,7 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { withAuth } from 'hooks/misc/withAuth' +import { DOCS_URL } from 'lib/constants' import { Button, Popover_Shadcn_, @@ -169,7 +170,7 @@ const EdgeFunctionDetailsLayout = ({ } /> )} - +
- +
diff --git a/apps/studio/components/ui/GrafanaPromoBanner.tsx b/apps/studio/components/ui/GrafanaPromoBanner.tsx index 22598234352e2..c3bbab5918d0a 100644 --- a/apps/studio/components/ui/GrafanaPromoBanner.tsx +++ b/apps/studio/components/ui/GrafanaPromoBanner.tsx @@ -1,9 +1,10 @@ +import { BookOpen } from 'lucide-react' +import Link from 'next/link' + import { useParams } from 'common' import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' -import { BASE_PATH } from 'lib/constants' -import { BookOpen } from 'lucide-react' -import Link from 'next/link' +import { BASE_PATH, DOCS_URL } from 'lib/constants' import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui' const GrafanaPromoBanner = () => ( @@ -58,7 +59,7 @@ const GrafanaBannerActions = ({ className }: { className?: string }) => {
*/} - +
), }) @@ -121,7 +122,7 @@ export const useTableRowDeleteMutation = ({ each row before updating or deleting the row.

- +
), diff --git a/apps/studio/hooks/analytics/useLogsQuery.tsx b/apps/studio/hooks/analytics/useLogsQuery.tsx index 4e4f8b84aedf6..33d9404c64ee0 100644 --- a/apps/studio/hooks/analytics/useLogsQuery.tsx +++ b/apps/studio/hooks/analytics/useLogsQuery.tsx @@ -16,6 +16,7 @@ import { checkForWithClause, } from 'components/interfaces/Settings/Logs/Logs.utils' import { get } from 'data/fetchers' +import { DOCS_URL } from 'lib/constants' export interface LogsQueryHook { params: LogsEndpointParams @@ -98,13 +99,13 @@ const useLogsQuery = ( if (usesWith) { error = { message: 'The parser does not yet support WITH and subquery statements.', - docs: 'https://supabase.com/docs/guides/platform/advanced-log-filtering#the-with-keyword-and-subqueries-are-not-supported', + docs: `${DOCS_URL}/guides/platform/advanced-log-filtering#the-with-keyword-and-subqueries-are-not-supported`, } } if (usesILIKE) { error = { message: 'BigQuery does not support ILIKE. Use REGEXP_CONTAINS instead.', - docs: 'https://supabase.com/docs/guides/platform/advanced-log-filtering#the-ilike-and-similar-to-keywords-are-not-supported', + docs: `${DOCS_URL}/guides/platform/advanced-log-filtering#the-ilike-and-similar-to-keywords-are-not-supported`, } } } diff --git a/apps/studio/lib/ai/prompts.ts b/apps/studio/lib/ai/prompts.ts index 09682ba2f0625..43df8afb19d0f 100644 --- a/apps/studio/lib/ai/prompts.ts +++ b/apps/studio/lib/ai/prompts.ts @@ -1,3 +1,5 @@ +import { DOCS_URL } from 'lib/constants' + export const RLS_PROMPT = ` Developer: # PostgreSQL RLS in Supabase: Condensed Guide @@ -232,11 +234,11 @@ Developer: # Postgres Best Practices - Enable Row Level Security (RLS) on all new tables with \`enable row level security\`; inform users that they need to add policies. - Define foreign key references within the \`CREATE TABLE\` statement. - Whenever a foreign key is used, generate a separate \`CREATE INDEX\` statement for the foreign key column(s) to improve performance on joins. - - **Foreign Tables**: Place foreign tables in a schema named \`private\` (create the schema if needed). Explain the security risk (RLS bypass) and include a link: https://supabase.com/docs/guides/database/database-advisors?queryGroups=lint&lint=0017_foreign_table_in_api. + - **Foreign Tables**: Place foreign tables in a schema named \`private\` (create the schema if needed). Explain the security risk (RLS bypass) and include a link: ${DOCS_URL}/guides/database/database-advisors?queryGroups=lint&lint=0017_foreign_table_in_api. - **Views**: - Add \`with (security_invoker=on)\` immediately after \`CREATE VIEW view_name\`. - - **Materialized Views**: Store materialized views in the \`private\` schema (create if needed). Explain the security risk (RLS bypass) and reference: https://supabase.com/docs/guides/database/database-advisors?queryGroups=lint&lint=0016_materialized_view_in_api. + - **Materialized Views**: Store materialized views in the \`private\` schema (create if needed). Explain the security risk (RLS bypass) and reference: ${DOCS_URL}/guides/database/database-advisors?queryGroups=lint&lint=0016_materialized_view_in_api. - **Extensions**: - Always install extensions in the \`extensions\` schema or a dedicated schema, never in \`public\`. diff --git a/apps/studio/lib/constants/index.ts b/apps/studio/lib/constants/index.ts index 79338ec013da7..4a95864039e97 100644 --- a/apps/studio/lib/constants/index.ts +++ b/apps/studio/lib/constants/index.ts @@ -45,6 +45,8 @@ export const POSTHOG_URL = export const USAGE_APPROACHING_THRESHOLD = 0.75 +export const DOCS_URL = process.env.NEXT_PUBLIC_DOCS_URL || 'https://supabase.com/docs' + export const OPT_IN_TAGS = { AI_SQL: 'AI_SQL_GENERATOR_OPT_IN', AI_DATA: 'AI_DATA_GENERATOR_OPT_IN', diff --git a/apps/studio/pages/account/tokens.tsx b/apps/studio/pages/account/tokens.tsx index cae0704f8f83c..b03c749d4b1ec 100644 --- a/apps/studio/pages/account/tokens.tsx +++ b/apps/studio/pages/account/tokens.tsx @@ -14,6 +14,7 @@ import { ScaffoldSectionTitle, } from 'components/layouts/Scaffold' import { NewAccessToken } from 'data/access-tokens/access-tokens-create-mutation' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { Button } from 'ui' import { Input } from 'ui-patterns/DataInputs/Input' @@ -45,20 +46,12 @@ const UserAccessTokens: NextPageWithLayout = () => { />
diff --git a/apps/studio/pages/api/platform/projects/[ref]/run-lints.ts b/apps/studio/pages/api/platform/projects/[ref]/run-lints.ts index e58f7b326f781..4431f0c05972a 100644 --- a/apps/studio/pages/api/platform/projects/[ref]/run-lints.ts +++ b/apps/studio/pages/api/platform/projects/[ref]/run-lints.ts @@ -4,7 +4,7 @@ import { paths } from 'api-types' import { fetchPost } from 'data/fetchers' import { constructHeaders } from 'lib/api/apiHelpers' import apiWrapper from 'lib/api/apiWrapper' -import { PG_META_URL } from 'lib/constants' +import { DOCS_URL, PG_META_URL } from 'lib/constants' export default (req: NextApiRequest, res: NextApiResponse) => apiWrapper(req, res, handler) @@ -92,7 +92,7 @@ select fk.table_name, fk.fkey_name ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0001_unindexed_foreign_keys' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0001_unindexed_foreign_keys' as remediation, jsonb_build_object( 'schema', fk.schema_name, 'name', fk.table_name, @@ -132,7 +132,7 @@ select 'View/Materialized View "%s" in the public schema may expose \`auth.users\` data to anon or authenticated roles.', c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0002_auth_users_exposed' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0002_auth_users_exposed' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -246,12 +246,12 @@ select array['PERFORMANCE'] as categories, 'Detects if calls to \`auth.()\` in RLS policies are being unnecessarily re-evaluated for each row' as description, format( - 'Table \`%s.%s\` has a row level security policy \`%s\` that re-evaluates an auth.() for each row. This produces suboptimal query performance at scale. Resolve the issue by replacing \`auth.()\` with \`(select auth.())\`. See [docs](https://supabase.com/docs/guides/database/postgres/row-level-security#call-functions-with-select) for more info.', + 'Table \`%s.%s\` has a row level security policy \`%s\` that re-evaluates an auth.() for each row. This produces suboptimal query performance at scale. Resolve the issue by replacing \`auth.()\` with \`(select auth.())\`. See [docs](${DOCS_URL}/guides/database/postgres/row-level-security#call-functions-with-select) for more info.', schema_name, table_name, policy_name ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0003_auth_rls_initplan' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0003_auth_rls_initplan' as remediation, jsonb_build_object( 'schema', schema_name, 'name', table_name, @@ -315,7 +315,7 @@ select pgns.nspname, pgc.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0004_no_primary_key' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0004_no_primary_key' as remediation, jsonb_build_object( 'schema', pgns.nspname, 'name', pgc.relname, @@ -362,7 +362,7 @@ select psui.schemaname, psui.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0005_unused_index' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0005_unused_index' as remediation, jsonb_build_object( 'schema', psui.schemaname, 'name', psui.relname, @@ -407,7 +407,7 @@ select act.cmd, array_agg(p.polname order by p.polname) ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0006_multiple_permissive_policies' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0006_multiple_permissive_policies' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -478,7 +478,7 @@ select c.relname, array_agg(p.polname order by p.polname) ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0007_policy_exists_rls_disabled' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0007_policy_exists_rls_disabled' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -523,7 +523,7 @@ select n.nspname, c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0008_rls_enabled_no_policy' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0008_rls_enabled_no_policy' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -570,7 +570,7 @@ select c.relname, array_agg(pi.indexname order by pi.indexname) ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0009_duplicate_index' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0009_duplicate_index' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -624,7 +624,7 @@ select n.nspname, c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0010_security_definer_view' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0010_security_definer_view' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -677,7 +677,7 @@ select n.nspname, p.proname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0011_function_search_path_mutable' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0011_function_search_path_mutable' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', p.proname, @@ -717,7 +717,7 @@ select n.nspname, c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0013_rls_disabled_in_public' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0013_rls_disabled_in_public' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -757,7 +757,7 @@ select 'Extension \`%s\` is installed in the public schema. Move it to another schema.', pe.extname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0014_extension_in_public' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0014_extension_in_public' as remediation, jsonb_build_object( 'schema', pe.extnamespace::regnamespace, 'name', pe.extname, @@ -811,7 +811,7 @@ select table_name, policy_name ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0015_rls_references_user_metadata' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0015_rls_references_user_metadata' as remediation, jsonb_build_object( 'schema', schema_name, 'name', table_name, @@ -847,7 +847,7 @@ select n.nspname, c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0016_materialized_view_in_api' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0016_materialized_view_in_api' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -890,7 +890,7 @@ select n.nspname, c.relname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, @@ -935,7 +935,7 @@ select a.attname, t.typname ) as detail, - 'https://supabase.com/docs/guides/database/database-linter?lint=unsupported_reg_types' as remediation, + '${DOCS_URL}/guides/database/database-linter?lint=unsupported_reg_types' as remediation, jsonb_build_object( 'schema', n.nspname, 'name', c.relname, diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx index 2936e1401209d..cadcae32c7455 100644 --- a/apps/studio/pages/new/[slug].tsx +++ b/apps/studio/pages/new/[slug].tsx @@ -58,6 +58,7 @@ import { getCloudProviderArchitecture } from 'lib/cloudprovider-utils' import { AWS_REGIONS_DEFAULT, DEFAULT_MINIMUM_PASSWORD_STRENGTH, + DOCS_URL, FLY_REGIONS_DEFAULT, MANAGED_BY, PROJECT_STATUS, @@ -505,7 +506,7 @@ const Wizard: NextPageWithLayout = () => {

Each project includes a dedicated Postgres instance running on its own server. You are charged for the{' '} - + Compute resource {' '} of that server, independent of your database usage. @@ -754,7 +755,7 @@ const Wizard: NextPageWithLayout = () => {

Compute add-ons

@@ -764,7 +765,7 @@ const Wizard: NextPageWithLayout = () => {

Compute billing

@@ -1029,7 +1030,7 @@ const Wizard: NextPageWithLayout = () => { monthly costs by ${additionalMonthlySpend}, independent of how actively you use it. By clicking "I understand", you agree to the additional costs.{' '} diff --git a/apps/studio/pages/project/[ref]/advisors/performance.tsx b/apps/studio/pages/project/[ref]/advisors/performance.tsx index 3b0e83b7a2320..2e830a927cf5a 100644 --- a/apps/studio/pages/project/[ref]/advisors/performance.tsx +++ b/apps/studio/pages/project/[ref]/advisors/performance.tsx @@ -12,6 +12,7 @@ import DefaultLayout from 'components/layouts/DefaultLayout' import { FormHeader } from 'components/ui/Forms/FormHeader' import { Lint, useProjectLintsQuery } from 'data/lint/lint-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { LoadingLine } from 'ui' @@ -60,7 +61,7 @@ const ProjectLints: NextPageWithLayout = () => { { @@ -49,7 +50,9 @@ const QueryPerformanceReport: NextPageWithLayout = () => { actions={
- +
} diff --git a/apps/studio/pages/project/[ref]/advisors/security.tsx b/apps/studio/pages/project/[ref]/advisors/security.tsx index aaa28234f92f2..4007964fa3e14 100644 --- a/apps/studio/pages/project/[ref]/advisors/security.tsx +++ b/apps/studio/pages/project/[ref]/advisors/security.tsx @@ -12,6 +12,7 @@ import DefaultLayout from 'components/layouts/DefaultLayout' import { FormHeader } from 'components/ui/Forms/FormHeader' import { Lint, useProjectLintsQuery } from 'data/lint/lint-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { LoadingLine } from 'ui' @@ -62,7 +63,7 @@ const ProjectLints: NextPageWithLayout = () => { { @@ -38,9 +39,7 @@ const AuditLogsPage: NextPageWithLayout = () => { ) } -const secondaryActions = [ - , -] +const secondaryActions = [] AuditLogsPage.getLayout = (page) => ( diff --git a/apps/studio/pages/project/[ref]/auth/hooks.tsx b/apps/studio/pages/project/[ref]/auth/hooks.tsx index 023327154fa03..b3a04bfb3ba63 100644 --- a/apps/studio/pages/project/[ref]/auth/hooks.tsx +++ b/apps/studio/pages/project/[ref]/auth/hooks.tsx @@ -8,6 +8,7 @@ import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold' import { DocsButton } from 'components/ui/DocsButton' import NoPermission from 'components/ui/NoPermission' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { GenericSkeletonLoader } from 'ui-patterns' @@ -33,9 +34,7 @@ const Hooks: NextPageWithLayout = () => { ) } -const secondaryActions = [ - , -] +const secondaryActions = [] Hooks.getLayout = (page) => ( diff --git a/apps/studio/pages/project/[ref]/auth/policies.tsx b/apps/studio/pages/project/[ref]/auth/policies.tsx index cc3bd1269d56a..d3552118935b4 100644 --- a/apps/studio/pages/project/[ref]/auth/policies.tsx +++ b/apps/studio/pages/project/[ref]/auth/policies.tsx @@ -24,6 +24,7 @@ import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useUrlState } from 'hooks/ui/useUrlState' import { useIsProtectedSchema } from 'hooks/useProtectedSchemas' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { Input } from 'ui-patterns/DataInputs/Input' @@ -240,7 +241,7 @@ AuthPoliciesPage.getLayout = (page) => ( title="Policies" subtitle="Manage Row Level Security policies for your tables" secondaryActions={ - + } size="large" > diff --git a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx index 4b6d186e64dc4..a58829a87915f 100644 --- a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx +++ b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx @@ -12,6 +12,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { UnknownInterface } from 'components/ui/UnknownInterface' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' const RateLimitsPage: NextPageWithLayout = () => { @@ -51,7 +52,9 @@ RateLimitsPage.getLayout = (page) => ( title="Rate Limits" subtitle="Safeguard against bursts of incoming traffic to prevent abuse and maximize stability" primaryActions={ - + } > {page} diff --git a/apps/studio/pages/project/[ref]/branches/index.tsx b/apps/studio/pages/project/[ref]/branches/index.tsx index ab2a15e25af73..411755feb33d4 100644 --- a/apps/studio/pages/project/[ref]/branches/index.tsx +++ b/apps/studio/pages/project/[ref]/branches/index.tsx @@ -22,6 +22,7 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { useAppStateSnapshot } from 'state/app-state' import type { NextPageWithLayout } from 'types' import { Button } from 'ui' @@ -223,7 +224,7 @@ BranchesPage.getLayout = (page) => { Branching Feedback - +
) diff --git a/apps/studio/pages/project/[ref]/branches/merge-requests.tsx b/apps/studio/pages/project/[ref]/branches/merge-requests.tsx index 536e5f4a21dc2..a0fa030ca1170 100644 --- a/apps/studio/pages/project/[ref]/branches/merge-requests.tsx +++ b/apps/studio/pages/project/[ref]/branches/merge-requests.tsx @@ -27,6 +27,7 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { Button, @@ -386,7 +387,7 @@ const MergeRequestsPageWrapper = ({ children }: PropsWithChildren<{}>) => { Branching Feedback - +
) diff --git a/apps/studio/pages/project/[ref]/database/backups/pitr.tsx b/apps/studio/pages/project/[ref]/database/backups/pitr.tsx index 94679b8eeb651..b211f18d66551 100644 --- a/apps/studio/pages/project/[ref]/database/backups/pitr.tsx +++ b/apps/studio/pages/project/[ref]/database/backups/pitr.tsx @@ -17,7 +17,7 @@ import { useBackupsQuery } from 'data/database/backups-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useIsOrioleDbInAws, useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' -import { PROJECT_STATUS } from 'lib/constants' +import { DOCS_URL, PROJECT_STATUS } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_ } from 'ui' import { Admonition } from 'ui-patterns' @@ -73,7 +73,7 @@ const PITR = () => { title="Database backups are not available for OrioleDB" description="OrioleDB is currently in public alpha and projects created are strictly ephemeral with no database backups" > - + ) } diff --git a/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx b/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx index 56016f6392c3d..a95b71e6339ad 100644 --- a/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx +++ b/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx @@ -30,7 +30,7 @@ import { useIsOrioleDb, useSelectedProjectQuery, } from 'hooks/misc/useSelectedProject' -import { PROJECT_STATUS } from 'lib/constants' +import { DOCS_URL, PROJECT_STATUS } from 'lib/constants' import { getDatabaseMajorVersion } from 'lib/helpers' import type { NextPageWithLayout } from 'types' import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Badge, Button } from 'ui' @@ -269,7 +269,7 @@ const RestoreToNewProject = () => { in our docs diff --git a/apps/studio/pages/project/[ref]/database/backups/scheduled.tsx b/apps/studio/pages/project/[ref]/database/backups/scheduled.tsx index b0a3b0c6c8000..26662ba7b00a4 100644 --- a/apps/studio/pages/project/[ref]/database/backups/scheduled.tsx +++ b/apps/studio/pages/project/[ref]/database/backups/scheduled.tsx @@ -16,6 +16,7 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader' import { useBackupsQuery } from 'data/database/backups-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useIsOrioleDbInAws } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { Admonition } from 'ui-patterns' @@ -47,7 +48,7 @@ const DatabaseScheduledBackups: NextPageWithLayout = () => { title="Database backups are not available for OrioleDB" description="OrioleDB is currently in public alpha and projects created are strictly ephemeral with no database backups" > - + ) : (
@@ -79,7 +80,7 @@ const DatabaseScheduledBackups: NextPageWithLayout = () => { terms of the granular recovery that can be performed.{' '} Learn more diff --git a/apps/studio/pages/project/[ref]/database/column-privileges.tsx b/apps/studio/pages/project/[ref]/database/column-privileges.tsx index 899e0ba436045..6b39bbab9f22d 100644 --- a/apps/studio/pages/project/[ref]/database/column-privileges.tsx +++ b/apps/studio/pages/project/[ref]/database/column-privileges.tsx @@ -31,6 +31,7 @@ import { useLocalStorage } from 'hooks/misc/useLocalStorage' import { useQuerySchemaState } from 'hooks/misc/useSchemaQueryState' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { useIsProtectedSchema } from 'hooks/useProtectedSchemas' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' @@ -227,7 +228,7 @@ const PrivilegesPage: NextPageWithLayout = () => {

Grant or revoke privileges on a column based on user role.

- + {isEnabled ? ( diff --git a/apps/studio/pages/project/[ref]/database/functions.tsx b/apps/studio/pages/project/[ref]/database/functions.tsx index 1ab76e36bb859..83b5f67490ed5 100644 --- a/apps/studio/pages/project/[ref]/database/functions.tsx +++ b/apps/studio/pages/project/[ref]/database/functions.tsx @@ -12,6 +12,7 @@ import { FormHeader } from 'components/ui/Forms/FormHeader' import NoPermission from 'components/ui/NoPermission' import { DatabaseFunction } from 'data/database-functions/database-functions-query' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' +import { DOCS_URL } from 'lib/constants' import type { NextPageWithLayout } from 'types' const DatabaseFunctionsPage: NextPageWithLayout = () => { @@ -67,7 +68,7 @@ const DatabaseFunctionsPage: NextPageWithLayout = () => {
{ return ( @@ -28,14 +29,14 @@ const IndexesPage: NextPageWithLayout = () => {
- + {!(logDrains?.length === 0) && (