Adds NPCs
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { SessionRow } from "@/components/documents/session/SessionRow";
|
||||
import { SecretRow } from "@/components/documents/secret/SecretRow";
|
||||
import {
|
||||
isNpc,
|
||||
isScene,
|
||||
isSecret,
|
||||
isSession,
|
||||
@@ -12,6 +13,7 @@ import {
|
||||
} from "@/lib/types";
|
||||
import { TreasureRow } from "./treasure/TreasureRow";
|
||||
import { SceneRow } from "./scene/SceneRow";
|
||||
import { NpcRow } from "./npc/NpcRow";
|
||||
|
||||
/**
|
||||
* Renders a row for any document type. Prioritizes Session, then Secret, then falls back to ID and creation time.
|
||||
@@ -24,10 +26,14 @@ export const DocumentRow = ({
|
||||
document: Document;
|
||||
session?: Session;
|
||||
}) => {
|
||||
if (isNpc(document)) {
|
||||
return <NpcRow npc={document} />;
|
||||
}
|
||||
|
||||
if (isSession(document)) {
|
||||
// Use SessionRow for session documents
|
||||
return <SessionRow session={document} />;
|
||||
}
|
||||
|
||||
if (isSecret(document)) {
|
||||
return <SecretRow secret={document} session={session} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user