mirror of
https://github.com/supabase/supabase.git
synced 2026-05-09 10:19:50 -04:00
549ca3677e
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? This adds a component showing a list of AI curated related threads to the detail thread view. ## What is the current behavior? This is not available. ## What is the new behavior? A new component on the thread view. ## Additional context Add any other context or screenshots. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
709 B
TypeScript
28 lines
709 B
TypeScript
import { Button } from 'ui'
|
|
import { getChannelDisplayName } from '~/data/contribute'
|
|
import type { ThreadSource } from '~/types/contribute'
|
|
|
|
interface HelpOnPlatformButtonProps {
|
|
channel: ThreadSource
|
|
externalActivityUrl: string
|
|
type?: 'primary' | 'default'
|
|
className?: string
|
|
}
|
|
|
|
export function HelpOnPlatformButton({
|
|
channel,
|
|
externalActivityUrl,
|
|
type = 'primary',
|
|
className = 'w-full sm:w-fit',
|
|
}: HelpOnPlatformButtonProps) {
|
|
const platformName = getChannelDisplayName(channel)
|
|
|
|
return (
|
|
<Button asChild type={type} className={className}>
|
|
<a href={externalActivityUrl} target="_blank" rel="noopener noreferrer">
|
|
Help on {platformName}
|
|
</a>
|
|
</Button>
|
|
)
|
|
}
|