Makes some document previews
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { DocumentPreview } from "@/components/documents/DocumentPreview";
|
||||
import { DocumentRow } from "@/components/documents/DocumentRow";
|
||||
import { SessionRow } from "@/components/documents/session/SessionRow";
|
||||
import { Tab, TabbedLayout } from "@/components/layout/TabbedLayout";
|
||||
import { Loader } from "@/components/Loader";
|
||||
import { DocumentLoader } from "@/context/document/DocumentLoader";
|
||||
import { useDocument } from "@/context/document/hooks";
|
||||
import { pb } from "@/lib/pocketbase";
|
||||
import type { Campaign, DocumentId, Relationship, Session } from "@/lib/types";
|
||||
@@ -166,11 +168,14 @@ function Flyout({ docId }: { docId: DocumentId }) {
|
||||
const { docResult } = useDocument(docId);
|
||||
|
||||
if (docResult?.type !== "ready") {
|
||||
return <Loader />;
|
||||
return (
|
||||
<DocumentLoader documentId={docId}>
|
||||
<Loader />
|
||||
</DocumentLoader>
|
||||
);
|
||||
}
|
||||
|
||||
const doc = docResult.value.doc;
|
||||
|
||||
// TODO: Document preview
|
||||
return <DocumentRow document={doc} root={doc} />;
|
||||
return <DocumentPreview doc={doc} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user