From 6b9a5ee2fa0fb53995f55d139cf7c994d3be4e60 Mon Sep 17 00:00:00 2001 From: Pabloader Date: Thu, 4 Jun 2026 18:20:49 +0000 Subject: [PATCH] Fix wrong world substitution --- src/games/storywriter/components/menu.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/games/storywriter/components/menu.tsx b/src/games/storywriter/components/menu.tsx index 0e351ef..a80f1c7 100644 --- a/src/games/storywriter/components/menu.tsx +++ b/src/games/storywriter/components/menu.tsx @@ -47,6 +47,7 @@ const RenameInput = ({ value, onSubmit, onCancel, className }: RenameInputProps) interface StoryItemProps { story: Story; + world: World; active: boolean; onSelect: () => void; onRename: (newTitle: string) => void; @@ -55,7 +56,7 @@ interface StoryItemProps { onExport: () => void; } -const StoryItem = ({ story, active, onSelect, onRename, onDelete, onDuplicate, onExport }: StoryItemProps) => { +const StoryItem = ({ story, world, active, onSelect, onRename, onDelete, onDuplicate, onExport }: StoryItemProps) => { const isEditing = useBool(false); const appState = useAppState(); @@ -78,7 +79,10 @@ const StoryItem = ({ story, active, onSelect, onRename, onDelete, onDuplicate, o onClick={onSelect} onDblClick={isEditing.setTrue} > - {Prompt.substituteVars(appState, story.title)} + {Prompt.substituteVars({ + ...appState, + currentWorld: world, + }, story.title)}