refresh router -> refresh assistants (#3271)

This commit is contained in:
pablodanswer 2024-11-27 11:11:58 -08:00 committed by GitHub
parent 07dfde2209
commit 9c0cc94f15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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.`,

View File

@ -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()}`