Skip to content

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

Add anchors to address addon sections with url tags

Long Hoangd72f789c6fc0
diff --git a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
index 83aa5900809..bec0db6789c 100644
--- a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
+++ b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
@@ -1,4 +1,4 @@
-import { FC } from 'react'
+import { FC, useEffect } from 'react'
import Link from 'next/link'
import { Badge, Button, IconExternalLink, Radio } from 'ui'
@@ -24,8 +24,16 @@ const ComputeSizeSelection: FC<Props> = ({
const { ref } = useParams()
const addonUpdateDisabled = useFlag('disableProjectCreationAndUpdate')
+ useEffect(() => {
+ const hash = window.location.hash
+ if (hash.length > 0) {
+ window.location.hash = ''
+ window.location.hash = hash
+ }
+ })
+
return (
- <div className="space-y-4">
+ <div className="space-y-4" id="compute-addon">
<div className="flex items-center justify-between">
<div>
<div className="flex items-center space-x-2">
diff --git a/studio/components/interfaces/Billing/AddOns/CustomDomainSelection.tsx b/studio/components/interfaces/Billing/AddOns/CustomDomainSelection.tsx
index 022940f66cd..7a69cf1077a 100644
--- a/studio/components/interfaces/Billing/AddOns/CustomDomainSelection.tsx
+++ b/studio/components/interfaces/Billing/AddOns/CustomDomainSelection.tsx
@@ -1,5 +1,5 @@
import Link from 'next/link'
-import { FC } from 'react'
+import { FC, useEffect } from 'react'
import { Badge, Button, Radio } from 'ui'
import { useFlag } from 'hooks'
@@ -24,8 +24,16 @@ const CustomDomainSelection: FC<Props> = ({
const { ref } = useParams()
const addonUpdateDisabled = useFlag('disableProjectCreationAndUpdate')
+ useEffect(() => {
+ const hash = window.location.hash
+ if (hash.length > 0) {
+ window.location.hash = ''
+ window.location.hash = hash
+ }
+ })
+
return (
- <div className="space-y-4">
+ <div className="space-y-4" id="custom-domain-addon">
<div>
<div className="flex items-center space-x-2">
<h4 className="text-lg">Custom Domains</h4>
diff --git a/studio/components/interfaces/Billing/AddOns/PITRDurationSelection.tsx b/studio/components/interfaces/Billing/AddOns/PITRDurationSelection.tsx
index 52476a92bd4..ea74a0a78c5 100644
--- a/studio/components/interfaces/Billing/AddOns/PITRDurationSelection.tsx
+++ b/studio/components/interfaces/Billing/AddOns/PITRDurationSelection.tsx
@@ -1,5 +1,5 @@
import Link from 'next/link'
-import { FC } from 'react'
+import { FC, useEffect } from 'react'
import { Badge, IconAlertCircle, Radio, Button } from 'ui'
import { useFlag, useStore } from 'hooks'
@@ -29,12 +29,20 @@ const PITRDurationSelection: FC<Props> = ({
const projectRegion = ui.selectedProject?.region ?? ''
+ useEffect(() => {
+ const hash = window.location.hash
+ if (hash.length > 0) {
+ window.location.hash = ''
+ window.location.hash = hash
+ }
+ })
+
// Only projects of version greater than supabase-postgrest-14.1.0.44 can use PITR
const sufficientPgVersion = getSemanticVersion(ui.selectedProject?.dbVersion ?? '') >= 141044
const isDisabledForRegion = ['ap-northeast-2'].includes(projectRegion)
return (
- <div className="space-y-4">
+ <div className="space-y-4" id="pitr-addon">
<div>
<div className="flex items-center space-x-2">
<h4 className="text-lg">Point in time recovery (PITR)</h4>
diff --git a/studio/components/interfaces/Billing/AddOns/SupportPlan.tsx b/studio/components/interfaces/Billing/AddOns/SupportPlan.tsx
index 5fa2c3af196..979319219d1 100644
--- a/studio/components/interfaces/Billing/AddOns/SupportPlan.tsx
+++ b/studio/components/interfaces/Billing/AddOns/SupportPlan.tsx
@@ -1,4 +1,4 @@
-import { FC } from 'react'
+import { FC, useEffect } from 'react'
import Link from 'next/link'
import { Button } from 'ui'
import { useParams } from 'common/hooks'
@@ -9,8 +9,17 @@ interface Props {
const SupportPlan: FC<Props> = ({ currentOption }) => {
const { ref } = useParams()
+
+ useEffect(() => {
+ const hash = window.location.hash
+ if (hash.length > 0) {
+ window.location.hash = ''
+ window.location.hash = hash
+ }
+ })
+
return (
- <div className="space-y-4">
+ <div className="space-y-4" id="support-addon">
<div>
<div className="flex items-center space-x-2">
<h4 className="text-lg">Support Plan</h4>