mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 14:34:35 +08:00
* clean up AI assistant aside * add Discord aside * misc tweaks to AI cta * improve Discord CTA * markup * fix test file * Minor clean up and fixes * Small improvement --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
29 lines
679 B
TypeScript
29 lines
679 B
TypeScript
import Link from 'next/link'
|
|
import type { ComponentProps, PropsWithChildren } from 'react'
|
|
|
|
import { takeBreadcrumbSnapshot } from 'lib/breadcrumbs'
|
|
import { createSupportFormUrl, type SupportFormUrlKeys } from './SupportForm.utils'
|
|
|
|
export const SupportLink = ({
|
|
children,
|
|
queryParams,
|
|
...props
|
|
}: PropsWithChildren<
|
|
{ queryParams?: Partial<SupportFormUrlKeys> } & Omit<ComponentProps<typeof Link>, 'href'>
|
|
>) => {
|
|
const href = createSupportFormUrl(queryParams ?? {})
|
|
|
|
return (
|
|
<Link
|
|
{...props}
|
|
href={href}
|
|
onClick={(event) => {
|
|
takeBreadcrumbSnapshot()
|
|
props.onClick?.(event)
|
|
}}
|
|
>
|
|
{children}
|
|
</Link>
|
|
)
|
|
}
|