mirror of
https://github.com/supabase/supabase.git
synced 2026-05-10 10:50:18 -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>
27 lines
730 B
TypeScript
27 lines
730 B
TypeScript
import { createServerClient } from '@supabase/ssr'
|
|
import { cookies } from 'next/headers'
|
|
|
|
export async function createContributeServerClient() {
|
|
const cookieStore = await cookies()
|
|
return createServerClient(
|
|
process.env.NEXT_PUBLIC_SUPABASE_CONTRIBUTE_URL!,
|
|
process.env.NEXT_PUBLIC_SUPABASE_CONTRIBUTE_PUBLISHABLE_KEY!,
|
|
{
|
|
cookies: {
|
|
getAll() {
|
|
return cookieStore.getAll()
|
|
},
|
|
setAll(cookiesToSet) {
|
|
try {
|
|
cookiesToSet.forEach(({ name, value, options }) =>
|
|
cookieStore.set(name, value, options)
|
|
)
|
|
} catch {
|
|
// Can be ignored in Server Actions per Supabase docs
|
|
}
|
|
},
|
|
},
|
|
}
|
|
)
|
|
}
|