Files
supabase/apps/studio/components/interfaces/Support/SupportLink.tsx
Danny White da686b2cd9 feat(studio): Discord community on support ticket creation (#40972)
* 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>
2025-12-04 09:20:29 -03:30

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>
)
}