Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim145 committed Nov 21, 2024
1 parent 615090b commit be493c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions frontend/components/mailTemplates/TemplateEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default function TemplateEditor() {
const [event, setEvent] = useState(null);

const fetchData = async () => {
try {
try
{
await api.set()
.success(res =>
{
Expand All @@ -21,11 +22,13 @@ export default function TemplateEditor() {
setLoading(false);
setTemplateName(res.template.name);
})
.error(res => {
.error(res =>
{
swal("Une erreur est survenue lors de la récupération des templates", res.error, "error");
})
.get( window.location.pathname + "", {});
} catch (error) {
.get(window.location.pathname + "", {});
}
catch (error) {
swal("Erreur", "Impossible de récupérer les templates.", "error");
}
}
Expand Down

0 comments on commit be493c3

Please sign in to comment.