From 2c0369718987fd8be0b3d7f27972f7e190de97c5 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Wed, 27 Nov 2024 09:43:08 -0800 Subject: [PATCH] refresh router -> refresh assistants --- web/src/app/admin/assistants/AssistantEditor.tsx | 2 +- web/src/app/admin/assistants/PersonaTable.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/app/admin/assistants/AssistantEditor.tsx b/web/src/app/admin/assistants/AssistantEditor.tsx index 650c4d199a8..f2fb85d1b79 100644 --- a/web/src/app/admin/assistants/AssistantEditor.tsx +++ b/web/src/app/admin/assistants/AssistantEditor.tsx @@ -405,7 +405,7 @@ export function AssistantEditor({ message: `"${assistant.name}" has been added to your list.`, type: "success", }); - router.refresh(); + await refreshAssistants(); } else { setPopup({ message: `"${assistant.name}" could not be added to your list.`, diff --git a/web/src/app/admin/assistants/PersonaTable.tsx b/web/src/app/admin/assistants/PersonaTable.tsx index c5dcfc2690e..e451a519b49 100644 --- a/web/src/app/admin/assistants/PersonaTable.tsx +++ b/web/src/app/admin/assistants/PersonaTable.tsx @@ -90,7 +90,7 @@ export function PersonasTable() { message: `Failed to update persona order - ${await response.text()}`, }); setFinalPersonas(assistants); - router.refresh(); + await refreshAssistants(); return; } @@ -151,7 +151,7 @@ export function PersonasTable() { persona.is_visible ); if (response.ok) { - router.refresh(); + await refreshAssistants(); } else { setPopup({ type: "error", @@ -183,7 +183,7 @@ export function PersonasTable() { onClick={async () => { const response = await deletePersona(persona.id); if (response.ok) { - router.refresh(); + await refreshAssistants(); } else { alert( `Failed to delete persona - ${await response.text()}`