small improvements

This commit is contained in:
Daniel
2023-06-03 07:20:16 +03:30
parent a7021972eb
commit 6a4f21fc0a
4 changed files with 17 additions and 14 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
const getPublicCollectionData = async (collectionId: string) => {
const getPublicCollectionData = async (
collectionId: string,
setData?: Function
) => {
const res = await fetch(
"/api/public/routes/collections/?collectionId=" + collectionId
);
const data = await res.json();
console.log(data);
if (setData) setData(data.response);
return data;
};