mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
introduced `useRoutePathState` for managing active states via routes, added `CollapsibleList` for reusable collapsible UI, and updated various components to leverage route awareness for improved navigation state handling. Also adjusted routing for entities, strategies, and schema to support optional sub-paths.
26 lines
1011 B
TypeScript
26 lines
1011 B
TypeScript
import { Route, Switch } from "wouter";
|
|
import { DataEmpty, DataRoot } from "./_data.root";
|
|
import { DataEntityUpdate } from "./data.$entity.$id";
|
|
import { DataEntityCreate } from "./data.$entity.create";
|
|
import { DataEntityList } from "./data.$entity.index";
|
|
import { DataSchemaEntity } from "./data.schema.$entity";
|
|
import { DataSchemaIndex } from "./data.schema.index";
|
|
|
|
export default function DataRoutes() {
|
|
return (
|
|
<DataRoot>
|
|
<Switch>
|
|
<Route path="/" component={DataEmpty} />
|
|
<Route path="/entity/:entity" component={DataEntityList} />
|
|
<Route path="/entity/:entity/create" component={DataEntityCreate} />
|
|
<Route path="/entity/:entity/edit/:id" component={DataEntityUpdate} />
|
|
|
|
<Route path="/schema" nest>
|
|
<Route path="/" component={DataSchemaIndex} />
|
|
<Route path="/entity/:entity/:setting?/:sub?" component={DataSchemaEntity} />
|
|
</Route>
|
|
</Switch>
|
|
</DataRoot>
|
|
);
|
|
}
|