Bridge integration

This commit is contained in:
Darren Clarke 2024-05-09 07:42:44 +02:00
parent 42a5e09c94
commit 162390008b
56 changed files with 776 additions and 591 deletions

View file

@ -6,6 +6,7 @@ import { List as InternalList, Button } from "ui";
import { type Selectable } from "kysely";
import { type Database } from "bridge-common";
import { serviceConfig } from "../config/config";
import { getBasePath } from "../lib/frontendUtils";
type ListProps = {
service: string;
@ -18,7 +19,7 @@ export const List: FC<ListProps> = ({ service, rows }) => {
const router = useRouter();
const onRowClick = (id: string) => {
router.push(`/${entity}/${id}`);
router.push(`${getBasePath()}${entity}/${id}`);
};
return (
@ -28,7 +29,11 @@ export const List: FC<ListProps> = ({ service, rows }) => {
columns={listColumns}
onRowClick={onRowClick}
buttons={
<Button text="Create" kind="primary" href={`/${entity}/create`} />
<Button
text="Create"
kind="primary"
href={`${getBasePath()}${entity}/create`}
/>
}
/>
);