WIP: Linking in document list. Working on copying relationships to new sessions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { RelationshipList } from "@/components/RelationshipList";
|
||||
import { DocumentEditForm } from "@/components/documents/DocumentEditForm";
|
||||
import { pb } from "@/lib/pocketbase";
|
||||
import { displayName } from "@/lib/relationships";
|
||||
import { displayName, relationshipsForDocument } from "@/lib/relationships";
|
||||
import { RelationshipType, type AnyDocument } from "@/lib/types";
|
||||
import { Tab, TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/react";
|
||||
import { createFileRoute, Link } from "@tanstack/react-router";
|
||||
@@ -23,17 +23,10 @@ function RouteComponent() {
|
||||
document: AnyDocument;
|
||||
};
|
||||
|
||||
const relationshipList = [
|
||||
RelationshipType.Scenes,
|
||||
RelationshipType.Secrets,
|
||||
RelationshipType.Locations,
|
||||
RelationshipType.Npcs,
|
||||
RelationshipType.Monsters,
|
||||
RelationshipType.Treasures,
|
||||
];
|
||||
const relationshipList = relationshipsForDocument(document);
|
||||
|
||||
return (
|
||||
<div className="max-w-xl mx-auto py-2 px-4">
|
||||
<div key={document.id} className="max-w-xl mx-auto py-2 px-4">
|
||||
<Link
|
||||
to="/document/$documentId/print"
|
||||
params={{ documentId: document.id }}
|
||||
|
||||
Reference in New Issue
Block a user