dev #21

Merged
Seazn merged 35 commits from dev into main 2026-05-21 17:34:44 +00:00
Showing only changes of commit 6441a39e71 - Show all commits

View File

@ -40,7 +40,6 @@ export function useCoffeePictures(coffeeId?: string) {
useEffect(() => {
if (!coffeeId) {
setPictureUrls([]);
return;
}
@ -51,9 +50,10 @@ export function useCoffeePictures(coffeeId?: string) {
];
let isCancelled = false;
setLoading(true);
const loadPictures = async () => {
if (!isCancelled) setLoading(true);
for (const url of candidateUrls) {
try {
const response = await authFetch(url, {
@ -105,5 +105,8 @@ export function useCoffeePictures(coffeeId?: string) {
};
}, [coffeeId]);
return { pictureUrls, loading };
return {
pictureUrls: coffeeId ? pictureUrls : [],
loading: coffeeId ? loading : false,
};
}