Adds treasures
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { RelationshipType, type CampaignId, type Document } from "@/lib/types";
|
||||
import { SecretForm } from "./secret/SecretForm";
|
||||
import { TreasureForm } from "./treasure/TreasureForm";
|
||||
|
||||
function assertUnreachable(_x: never): never {
|
||||
throw new Error("DocumentForm switch is not exhaustive");
|
||||
@@ -22,6 +23,8 @@ export const DocumentForm = ({
|
||||
return <SecretForm campaign={campaignId} onCreate={onCreate} />;
|
||||
case RelationshipType.DiscoveredIn:
|
||||
return "Form not supported here";
|
||||
case RelationshipType.Treasures:
|
||||
return <TreasureForm campaign={campaignId} onCreate={onCreate} />;
|
||||
}
|
||||
|
||||
return assertUnreachable(relationshipType);
|
||||
|
||||
Reference in New Issue
Block a user