Files
biggus-dickus/web/src/objects/objects-page.tsx
T
logaritmisk 859f41dcb9 feat(web): object detail + two-pane page + app routing
Implements the navigable SPA shell: object detail pane showing
inventory-minimum fields, flexible fields (via Record<string,unknown>
cast) and visibility badge; ObjectsPage two-pane layout; BrowserRouter
wired through RequireAuth+AppShell; QueryClient provided in main.tsx.
Consolidates ObjectList NavLink to use isActive function form, removing
manual useParams highlight.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 23:13:52 +02:00

28 lines
730 B
TypeScript

import { useParams } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { ObjectList } from "./object-list";
import { ObjectDetail } from "./object-detail";
export function ObjectsPage() {
const { t } = useTranslation();
const { id } = useParams();
return (
<div className="grid h-full grid-cols-[20rem_1fr]">
<div className="overflow-hidden border-r">
<ObjectList />
</div>
<div className="overflow-hidden">
{id ? (
<ObjectDetail />
) : (
<div className="flex h-full items-center justify-center p-4 text-sm text-neutral-400">
{t("objects.selectPrompt")}
</div>
)}
</div>
</div>
);
}