Makes a generic document row
This commit is contained in:
@@ -3,7 +3,6 @@ import { pb } from "@/lib/pocketbase";
|
||||
import { RelationshipType, type Session } from "@/lib/types";
|
||||
import { RelationshipList } from "@/components/RelationshipList";
|
||||
import { SessionForm } from "@/components/documents/session/SessionForm";
|
||||
import { SecretRow } from "@/components/documents/secret/SecretRow";
|
||||
import { SecretForm } from "@/components/documents/secret/SecretForm";
|
||||
|
||||
export const Route = createFileRoute("/_authenticated/document/$documentId")({
|
||||
@@ -29,12 +28,8 @@ function RouteComponent() {
|
||||
<RelationshipList
|
||||
root={session}
|
||||
relationshipType={RelationshipType.Secrets}
|
||||
renderRow={(secret) => {
|
||||
if (!(secret.data as any)?.secret) return null;
|
||||
return <SecretRow secret={secret as any} session={session} />;
|
||||
}}
|
||||
newItemForm={(onCreate) => (
|
||||
<SecretForm session={session} onCreate={onCreate} />
|
||||
<SecretForm campaign={session.campaign.id} onCreate={onCreate} />
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user