mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
## Context Related BE PR: https://github.com/supabase/platform/pull/32693 Add support to remove the custom domain add-on when deleting a custom domain after the custom domain is activated. <img width="411" height="310" alt="image" src="https://github.com/user-attachments/assets/23d57fc0-f760-42d4-8383-480ff2b2ec5a" /> We previously had this behaviour by default to address some customer feedback RE confusion that they were still being charged for custom domain add-on despite deleting the custom domain, but not removing the add-on. However this was a bit of confusing UX (RE deleting the add-on implicitly), so this makes the deleting of the custom domain add-on an explicit action instead. ## To test - [ ] Set up custom domain on a project - [ ] Trying deleting the custom domain after activating _without_ removing the add-on - [ ] Trying deleting the custom domain after activating _with_ removing the add-on
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import Link from 'next/link'
|
|
import { type MouseEvent, type PropsWithChildren } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
interface InlineLinkProps {
|
|
href: string
|
|
className?: string
|
|
target?: string
|
|
rel?: string
|
|
title?: string
|
|
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void
|
|
}
|
|
|
|
export const InlineLinkClassName =
|
|
'underline transition underline-offset-2 decoration-foreground-lighter hover:decoration-foreground text-inherit hover:text-foreground'
|
|
|
|
export const InlineLink = ({
|
|
href,
|
|
className: _className,
|
|
children,
|
|
title,
|
|
...props
|
|
}: PropsWithChildren<InlineLinkProps>) => {
|
|
const className = cn(InlineLinkClassName, _className)
|
|
if (href.startsWith('http')) {
|
|
return (
|
|
<a
|
|
title={title}
|
|
className={className}
|
|
href={href}
|
|
target="_blank"
|
|
rel="noreferrer noopener"
|
|
{...props}
|
|
>
|
|
{children}
|
|
</a>
|
|
)
|
|
}
|
|
return (
|
|
<Link className={className} href={href} title={title} {...props}>
|
|
{children}
|
|
</Link>
|
|
)
|
|
}
|