Skip to content

Commit

Permalink
refresh router -> refresh assistants (#3271)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx authored Nov 27, 2024
1 parent 07dfde2 commit 9c0cc94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/app/admin/assistants/AssistantEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/admin/assistants/PersonaTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function PersonasTable() {
message: `Failed to update persona order - ${await response.text()}`,
});
setFinalPersonas(assistants);
router.refresh();
await refreshAssistants();
return;
}

Expand Down Expand Up @@ -151,7 +151,7 @@ export function PersonasTable() {
persona.is_visible
);
if (response.ok) {
router.refresh();
await refreshAssistants();
} else {
setPopup({
type: "error",
Expand Down Expand Up @@ -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()}`
Expand Down

0 comments on commit 9c0cc94

Please sign in to comment.