dummy content

This commit is contained in:
isaconantonis 2023-08-11 17:21:43 +02:00
parent 568c6bdcb9
commit df83c9d3f0
7 changed files with 225 additions and 5 deletions

23
components/Chat/Chat.tsx Normal file
View file

@ -0,0 +1,23 @@
"use client"
import { useChat } from "ai/react"
export default function Chat() {
const { messages, input, handleInputChange, handleSubmit } = useChat()
return (
<div>
{messages.map((m) => (
<div key={m.id}>
{m.role}: {m.content}
</div>
))}
<form onSubmit={handleSubmit}>
<label>
Say something...
<input value={input} onChange={handleInputChange} />
</label>
</form>
</div>
)
}

View file

@ -24,6 +24,11 @@ export default function Nav() {
href: "/",
current: currentRoute === "/",
},
{
label: "About",
href: "/about",
current: currentRoute === "/about",
},
{
label: "Projects",
href: "/projects",