feat(web): introduce templates

This commit is contained in:
Ali BARIN
2025-02-26 10:40:47 +00:00
parent 69e91fea18
commit 839fda8880
33 changed files with 904 additions and 86 deletions

View File

@@ -0,0 +1,17 @@
import { useMutation } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useAdminUpdateTemplate(templateId) {
const mutation = useMutation({
mutationFn: async ({ name }) => {
const { data } = await api.patch(`/v1/admin/templates/${templateId}`, {
name,
});
return data;
},
});
return mutation;
}