Makes a generic document form

This commit is contained in:
2025-05-31 17:37:38 -07:00
parent 6b6636d695
commit 81fd84790b
5 changed files with 55 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
// SecretForm.tsx
// Form for adding a new secret to a session.
import { useState } from "react";
import type { Secret } from "@/lib/types";
import type { CampaignId, Secret } from "@/lib/types";
import { pb } from "@/lib/pocketbase";
/**
@@ -11,7 +11,7 @@ export const SecretForm = ({
campaign,
onCreate,
}: {
campaign: string;
campaign: CampaignId;
onCreate: (secret: Secret) => Promise<void>;
}) => {
const [newSecret, setNewSecret] = useState("");