Files
supabase/apps/www/components/Contribute/HelpOnPlatformButton.tsx
Tomás Pozo 549ca3677e feat: add similar threads on contribute (#42638)
## 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>
2026-03-05 12:06:55 -05:00

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