UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

21 lines (20 loc) 642 B
import { Dispatch, SetStateAction } from "react"; import { Comment } from "../../interfaces/models/Comment"; import { CommentsSortByOptions } from "../../interfaces/CommentsSortByOptions"; export interface UseRepliesProps { commentId: string; sortBy: CommentsSortByOptions; } export interface UseRepliesValues { replies: (Comment & { new: boolean; })[]; newReplies: (Comment & { new: boolean; })[]; loading: boolean; page: number; setPage: Dispatch<SetStateAction<number>>; } declare function useReplies({ commentId, sortBy }: UseRepliesProps): UseRepliesValues; export default useReplies;