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>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user