12
resources/client/profile/requests/use-profile-comments.ts
Executable file
12
resources/client/profile/requests/use-profile-comments.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import {useInfiniteData} from '@common/ui/infinite-scroll/use-infinite-data';
|
||||
import {useParams} from 'react-router-dom';
|
||||
import {Comment} from '@common/comments/comment';
|
||||
|
||||
export function useProfileComments() {
|
||||
const {userId = 'me'} = useParams();
|
||||
return useInfiniteData<Comment>({
|
||||
endpoint: `user-profile/${userId}/comments`,
|
||||
queryKey: ['comment', 'profile-page-comments', userId],
|
||||
paginate: 'simple',
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user