Moves editing into forms. Every doc has a page now. BUG: state not refreshed after mutation
This commit is contained in:
@@ -3,9 +3,9 @@ import { pb } from "@/lib/pocketbase";
|
||||
import type { Npc } from "@/lib/types";
|
||||
|
||||
/**
|
||||
* Renders an editable npc row
|
||||
* Renders an editable npc form
|
||||
*/
|
||||
export const NpcRow = ({ npc }: { npc: Npc }) => {
|
||||
export const NpcEditForm = ({ npc }: { npc: Npc }) => {
|
||||
async function saveNpcName(name: string) {
|
||||
await pb.collection("documents").update(npc.id, {
|
||||
data: {
|
||||
Reference in New Issue
Block a user