Files
2023-12-09 03:55:43 +01:00

53 lines
1.5 KiB
TypeScript

import { UseChatHelpers } from 'ai/react'
import { Button } from '@/components/ui/button'
import { ExternalLink } from '@/components/external-link'
import { IconArrowRight } from '@/components/ui/icons'
const exampleMessages = [
{
heading: 'Learn about Lux Network',
message: `What is Lux Network?`
},
{
heading: 'Learn about Lux Validator',
message: 'Give me instructions to run a Lux Node.'
},
{
heading: 'Get a Lux Credit Card',
message: `How do I apply for Lux Credit?`
},
{
heading: 'Join the community',
message: `How do I join the Lux DAO? Where is the Lux community based?`
}
]
export function EmptyScreen({ setInput }: Pick<UseChatHelpers, 'setInput'>) {
return (
<div className="mx-auto max-w-2xl px-4">
<div className="rounded-lg border bg-background p-8">
<h1 className="mb-2 text-lg font-semibold">
Hi, I'm Lux AI.
</h1>
<p className="leading-normal text-muted-foreground">
You can start a conversation here or try the following examples:
</p>
<div className="mt-4 flex flex-col items-start space-y-2">
{exampleMessages.map((message, index) => (
<Button
key={index}
variant="link"
className="h-auto p-0 text-base"
onClick={() => setInput(message.message)}
>
<IconArrowRight className="mr-2 text-muted-foreground" />
{message.heading}
</Button>
))}
</div>
</div>
</div>
)
}