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

index.tsx

34 lines883 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 forwardedProps: {
12 model: selectedModel,
13 },
14 })
15​
16 return (
17 <div className="mx-auto flex h-svh w-full max-w-3xl flex-col">
18 <header className="flex items-center justify-between px-4 py-4">
19 <div>
20 <p className="text-[11px] uppercase tracking-[0.22em] text-primary">
21 TanStack AI
22 </p>
23 <h1 className="text-2xl">Trip desk</h1>
24 </div>
25 <img
26 alt="TanStack"
27 className="h-7"
28 src="/brand/logos/tanstack-landscape-white.svg"
29 />
30 </header>
31 <chat.AppChat />
32 </div>
33 )