mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
* Rough contribute ui * Clean up filter area * Tweak query with new threads schema * Unify table and apply some ui nits * Fix types issues * Setup types * FilterS * Fix filters * Make search global * Add icons for table rows * Add single thread view * Loading state for threads * Fix icon colors * Add leaderboard * Fix conversation text overflow and add op badge * Rename leaderboard * Turn of leaderboard * Formatting * Remove other from product areas * And from stacks * Prettier types * Start contribute/about * About cards * Add avatar component * Polish up about page * Nudges * Add application form * Add squad form * Change to last 30 days instead of 24hrs * Responsive nudges * Format components for conversation view * Re use ui components on about page * Fix prettier errors * Filter nudges * chore(www): improve contribute UI (#41481) * hero tweaks * better table * wrap post time * nip and tuck * use table component * use table component * Add menu item * Alan/polish contribute filtering UI (#41504) * polishing tabs * nits in tables * nit in filtering * nits * ship it * fix selection style * nit search bar * Add view for authors * Format author page * Add contribute menu item * Tidy up about page * More about page edits * Update * basics * copy cleanup * improvements to thread table * threads improvements * remove extraneous div * thread improvements * chore(www): improve contribute UI (#41605) * basics * improvements to thread table * threads improvements * remove extraneous div * thread improvements * Add feature flag for contribute page * Add feature flag for contribute page * Fix ts error * Thread view nudges * Undo env change * Cleanup * Cleanup * Typos --------- Co-authored-by: Tomas Pozo <tomaspozogarzon@gmail.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> Co-authored-by: Alan Daniel <stylesshjs@gmail.com>
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import { Admonition } from 'ui-patterns'
|
|
import {
|
|
getAllProductAreas,
|
|
getAllStacks,
|
|
getChannelCounts,
|
|
getUnansweredThreads,
|
|
} from '~/data/contribute'
|
|
import { UnansweredThreadsTable } from './UnansweredThreadsTable'
|
|
|
|
export async function UnansweredThreads({
|
|
product_area,
|
|
channel,
|
|
stack,
|
|
search,
|
|
}: {
|
|
product_area?: string | string[]
|
|
channel?: string
|
|
stack?: string | string[]
|
|
search?: string
|
|
}) {
|
|
try {
|
|
const [threads, channelCounts, allProductAreas, allStacks] = await Promise.all([
|
|
getUnansweredThreads(product_area, channel, stack, search),
|
|
getChannelCounts(product_area, stack, search),
|
|
getAllProductAreas(),
|
|
getAllStacks(),
|
|
])
|
|
|
|
return (
|
|
<UnansweredThreadsTable
|
|
threads={threads}
|
|
channelCounts={channelCounts}
|
|
allProductAreas={allProductAreas}
|
|
allStacks={allStacks}
|
|
/>
|
|
)
|
|
} catch (error) {
|
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error'
|
|
return (
|
|
<Admonition
|
|
type="destructive"
|
|
title="Error loading threads"
|
|
description={errorMessage}
|
|
className="max-w-md mx-auto"
|
|
/>
|
|
)
|
|
}
|
|
}
|