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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user