Uses generic forms everywhere, gets rid of most doc-specific stuff
This commit is contained in:
@@ -3,12 +3,12 @@ import { displayName, relationshipsForDocument } from "@/lib/relationships";
|
||||
import { RelationshipType, type DocumentId } from "@/lib/types";
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import _ from "lodash";
|
||||
import { Loader } from "../Loader";
|
||||
import { DocumentTitle } from "./DocumentTitle";
|
||||
import { Tab, TabbedLayout } from "../layout/TabbedLayout";
|
||||
import { DocumentEditForm } from "./DocumentEditForm";
|
||||
import { RelatedDocumentList } from "./RelatedDocumentList";
|
||||
import { Loader } from "../Loader";
|
||||
import { DocumentPreview } from "./DocumentPreview";
|
||||
import { DocumentTitle } from "./DocumentTitle";
|
||||
import { GenericEditForm } from "./GenericEditForm";
|
||||
import { RelatedDocumentList } from "./RelatedDocumentList";
|
||||
|
||||
export function DocumentView({
|
||||
documentId,
|
||||
@@ -83,7 +83,7 @@ export function DocumentView({
|
||||
]}
|
||||
content={
|
||||
relationshipType === null ? (
|
||||
<DocumentEditForm document={doc} />
|
||||
<GenericEditForm doc={doc} />
|
||||
) : (
|
||||
<RelatedDocumentList
|
||||
documentId={doc.id}
|
||||
|
||||
Reference in New Issue
Block a user