Skip to content

Commit

Permalink
fix: Snippets notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed Jun 11, 2024
1 parent 7f44781 commit a61468c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/views/snippets/new-snippet-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const NewSnippetButton: Component = () => {

setRenaming(contentGroup.id);
setLoading(false);
notify({ text: "New content group created", type: "success" });
notify({ text: "New snippet created", type: "success" });
} catch (error) {
setLoading(false);
notify({ text: "Couldn't create new content group", type: "error" });
notify({ text: "Couldn't create new snippet", type: "error" });
}
}}
>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/views/snippets/snippet-entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ const SnippetEntry: Component<SnippetEntryProps> = (props) => {
await client.snippets.delete.mutate({ id: props.snippet.id });
snippetsActions.deleteSnippet({ id: props.snippet.id });
setLoading("");
notify({ text: "Content piece deleted", type: "success" });
notify({ text: "Snippet deleted", type: "success" });
} catch (error) {
notify({ text: "Couldn't delete the content piece", type: "error" });
notify({ text: "Couldn't delete the snippet", type: "error" });
setLoading("");
}
}
Expand Down

0 comments on commit a61468c

Please sign in to comment.