The preview runs on sample data. It needs no network and no channel.
tsx
import { YuvaDiscussionsProvider } from "@/hooks/use-yuva-discussions"
import { YuvaIdea } from "@/components/yuva-idea"
export function Idea({ id }: { id: string }) {
return (
<YuvaDiscussionsProvider
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL}
>
<YuvaIdea id={id} />
</YuvaDiscussionsProvider>
)
}Installation
Run this in a shadcn project. The files are copied into your own code.
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-idea.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-idea.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-idea.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-idea.jsonUsage
tsx
import { YuvaIdea } from "@/components/yuva-idea"
<YuvaIdea id={ideaId} onBack={() => setIdea(null)} />Props
YuvaIdeaProps
| Prop | Type |
|---|---|
id | string |
labels? | Partial<YuvaRoadmapLabels> |
discussionLabels? | Partial<YuvaDiscussionsLabels> |
className? | string |
onBack? | () => void |
onGone? | () => void |
Labels
The labels are listed on Yuva roadmap.
Dependencies
Installing this item also adds the following.