Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/RightDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { ResponseEditor } from './ResponseEditor'
import { SourceLinkage } from './SourceLinkage'
import type { DrawerTab } from '@/routes/_app'
import type { SourceItem } from '@/lib/adk'

export type DrawerTab = 'editor' | 'sources'

interface RightDrawerProps {
isOpen: boolean
onClose: () => void
Expand Down
14 changes: 0 additions & 14 deletions src/routes/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { Outlet, createFileRoute } from '@tanstack/react-router'
import { useCallback, useState } from 'react'
import { Sidebar } from '@/components/Sidebar'
import { RightDrawer } from '@/components/RightDrawer'
import { Header } from '@/components/Header'

export const Route = createFileRoute('/_app')({
component: AppLayout,
})

export type DrawerTab = 'editor' | 'sources'

function AppLayout() {
const [sidebarOpen, setSidebarOpen] = useState(false)
const [drawerOpen, setDrawerOpen] = useState(false)
const [activeDrawerTab, setActiveDrawerTab] = useState<DrawerTab>('editor')

const toggleSidebar = useCallback(() => setSidebarOpen((v) => !v), [])

Expand All @@ -31,15 +26,6 @@ function AppLayout() {
<section className="flex-1 flex flex-col bg-white min-w-0 relative overflow-hidden">
<Outlet />
</section>

{/* Right Drawer - Desktop: always visible, Mobile: bottom sheet */}
<RightDrawer
isOpen={drawerOpen}
onClose={() => setDrawerOpen(false)}
onOpen={() => setDrawerOpen(true)}
activeTab={activeDrawerTab}
onTabChange={setActiveDrawerTab}
/>
</main>
</div>
)
Expand Down
Loading