Core.Blueprint.UI.Web/src/hooks/use-sample-images.tsx
Sergio Matias Urquin 3609d1fa20 first commit
2025-04-29 18:47:35 -06:00

11 lines
381 B
TypeScript

import { ImageUrl } from "@/lib/interfaces";
import { deleteData, getData, postData, putData } from "@/services/api";
export const useSampleImage = async () => {
const url = '/blobsampleimage';
const response = await getData<ImageUrl>(url);
if(!response) {
throw new Error("An error occured while fetching the sample image data");
}
return response;
}