Refine gallery feedback actions
Mirror to GitHub / mirror (push) Successful in 2m10s
Test and Lint / backend-test (push) Successful in 1m48s
Test and Lint / frontend-test (push) Successful in 2m14s
Version and Release / version-bump (push) Failing after 50s
Version and Release / trigger-drone (push) Has been skipped

This commit is contained in:
2025-09-17 22:27:13 +02:00
parent b03760ab01
commit 19f8facc49
21 changed files with 719 additions and 376 deletions
+8 -3
View File
@@ -11,11 +11,16 @@ export const useGalleryInfo = (slug: string, token?: string) => {
});
};
export const useGalleryPhotos = (slug: string, filter?: 'liked' | 'favorited' | 'all', guestId?: string, enabled: boolean = true) => {
export const useGalleryPhotos = (
slug: string,
filter?: 'liked' | 'commented' | 'rated' | 'all',
guestId?: string,
enabled: boolean = true
) => {
return useQuery({
queryKey: ['gallery-photos', slug, filter, guestId],
// Do not pass guestId for now; backend will apply global filters when guest_id is absent
queryFn: () => galleryService.getGalleryPhotos(slug, filter, undefined),
// Pass guestId so backend can filter per-guest views when needed
queryFn: () => galleryService.getGalleryPhotos(slug, filter, guestId),
enabled,
retry: 1,
staleTime: 5 * 60 * 1000, // 5 minutes