forked from miurla/morphic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathempty-screen.tsx
51 lines (50 loc) · 1.33 KB
/
empty-screen.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { Button } from '@/components/ui/button'
import { ArrowRight } from 'lucide-react'
const exampleMessages = [
{
heading: 'Why is Nvidia growing rapidly?',
message: 'Why is Nvidia growing rapidly?'
},
{
heading: 'Is the Apple Vision Pro worth buying?',
message: 'Is the Apple Vision Pro worth buying?'
},
{
heading: 'How does the Vercel AI SDK work?',
message: 'How does the Vercel AI SDK work?'
},
{
heading: 'Tesla vs Rivian',
message: 'Tesla vs Rivian'
}
]
export function EmptyScreen({
submitMessage,
className
}: {
submitMessage: (message: string) => void
className?: string
}) {
return (
<div className={`mx-auto w-full transition-all ${className}`}>
<div className="bg-background p-2">
<div className="mt-4 flex flex-col items-start space-y-2 mb-4">
{exampleMessages.map((message, index) => (
<Button
key={index}
variant="link"
className="h-auto p-0 text-base"
name={message.message}
onClick={async () => {
submitMessage(message.message)
}}
>
<ArrowRight size={16} className="mr-2 text-muted-foreground" />
{message.heading}
</Button>
))}
</div>
</div>
</div>
)
}