diff --git a/src/components/RelationshipList.tsx b/src/components/RelationshipList.tsx index 50da46d..b2de2f3 100644 --- a/src/components/RelationshipList.tsx +++ b/src/components/RelationshipList.tsx @@ -35,10 +35,6 @@ export function RelationshipList({ return ; } - const doc = docResult.value.doc; - - console.info("Rendering relationship list: ", relationshipType); - const relationshipResult = docResult.value.relationships[relationshipType]; const relationship = @@ -60,7 +56,6 @@ export function RelationshipList({ try { // Check for existing relationship if (relationship) { - console.debug("Adding to existing relationship", relationship.id); const updatedRelationship: Relationship = await pb .collection("relationships") .update(relationship.id, { @@ -68,11 +63,10 @@ export function RelationshipList({ }); dispatch({ type: "setRelationship", - docId: doc.id, + docId: root.id, relationship: updatedRelationship, }); } else { - console.debug("Creating new relationship"); const updatedRelationship: Relationship = await pb .collection("relationships") .create({ @@ -82,7 +76,7 @@ export function RelationshipList({ }); dispatch({ type: "setRelationship", - docId: doc.id, + docId: root.id, relationship: updatedRelationship, }); } @@ -99,7 +93,6 @@ export function RelationshipList({ try { if (relationship) { - console.debug("Removing from existing relationship", relationship.id); const updatedRelationship: Relationship = await pb .collection("relationships") .update(relationship.id, { @@ -107,7 +100,7 @@ export function RelationshipList({ }); dispatch({ type: "setRelationship", - docId: doc.id, + docId: root.id, relationship: updatedRelationship, }); } diff --git a/src/components/documents/DocumentView.tsx b/src/components/documents/DocumentView.tsx index e29b029..4c60ee8 100644 --- a/src/components/documents/DocumentView.tsx +++ b/src/components/documents/DocumentView.tsx @@ -11,8 +11,6 @@ import { Route as RelationshipRoute } from "@/routes/_app/_authenticated/documen export function DocumentView({ documentId }: { documentId: DocumentId }) { const { docResult } = useDocument(documentId); - console.info(`Rendering document: `, docResult); - if (docResult?.type !== "ready") { return ; } @@ -50,16 +48,14 @@ export function DocumentView({ documentId }: { documentId: DocumentId }) {