list of attributes

This commit is contained in:
hamid zarghami
2026-01-25 09:55:45 +03:30
parent a37a7191dd
commit f8f79e3a9d
5 changed files with 107 additions and 2 deletions
@@ -97,3 +97,11 @@ export const useCreateAttribute = () => {
api.createAttribute(id, params),
});
};
export const useGetAttributes = (id: number) => {
return useQuery({
queryKey: ["product-attributes", id],
queryFn: () => api.getAttributes(id),
enabled: !!id,
});
};