mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* fix(studio): Handle query timeout error There is a global timeout of about 50s on /query endpoint This would fail the request independently from the user statement timeout setting add a case to handle this error and add a CTA to suggest the user of direct connection for long running queries * chore: apply pr comments * Tiny refactor --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
35 lines
820 B
TypeScript
35 lines
820 B
TypeScript
import Link from 'next/link'
|
|
import { PropsWithChildren } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
interface InlineLinkProps {
|
|
href: string
|
|
className?: string
|
|
target?: string
|
|
rel?: string
|
|
}
|
|
|
|
export const InlineLinkClassName =
|
|
'underline transition underline-offset-2 decoration-foreground-lighter hover:decoration-foreground text-foreground'
|
|
|
|
export const InlineLink = ({
|
|
href,
|
|
className: _className,
|
|
children,
|
|
...props
|
|
}: PropsWithChildren<InlineLinkProps>) => {
|
|
const className = cn(InlineLinkClassName, _className)
|
|
if (href.startsWith('http')) {
|
|
return (
|
|
<a className={className} href={href} target="_blank" rel="noreferrer noopener" {...props}>
|
|
{children}
|
|
</a>
|
|
)
|
|
}
|
|
return (
|
|
<Link className={className} href={href} {...props}>
|
|
{children}
|
|
</Link>
|
|
)
|
|
}
|