Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

index.tsx

35 lines912 Bytes

1import { createFileRoute } from '@tanstack/react-router'
2import { selectedModel } from '@/chat/model'
3import { useAppChat } from '@/components/chat/ui-components'
4​
5export const Route = createFileRoute('/')({
6 component: TripDesk,
7})
8​
9function TripDesk() {
10 const chat = useAppChat({
11 threadId: 'travel-chat',
12 forwardedProps: {
13 model: selectedModel,
14 },
15 })
16​
17 return (
18 <div className="mx-auto flex h-svh w-full max-w-3xl flex-col">
19 <header className="flex items-center justify-between px-4 py-4">
20 <div>
21 <p className="text-[11px] uppercase tracking-[0.22em] text-primary">
22 TanStack AI
23 </p>
24 <h1 className="text-2xl">Trip desk</h1>
25 </div>
26 <img
27 alt="TanStack"
28 className="h-7"
29 src="/brand/logos/tanstack-landscape-white.svg"
30 />
31 </header>
32 <chat.AppChat />
33 </div>
34 )