mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
removed almost all node sagas
This commit is contained in:
parent
f76a5a4798
commit
168ba8cc04
30 changed files with 268 additions and 448 deletions
|
@ -2,22 +2,23 @@ import { IComment, IFile } from '~/redux/types';
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
export interface CommentProviderProps {
|
||||
// user: IUser;
|
||||
comments: IComment[];
|
||||
count: number;
|
||||
hasMore: boolean;
|
||||
lastSeenCurrent?: string;
|
||||
isLoading: boolean;
|
||||
onShowImageModal: (images: IFile[], index: number) => void;
|
||||
onLoadMoreComments: () => void;
|
||||
onSaveComment: (comment: IComment) => Promise<unknown>;
|
||||
onDeleteComment: (id: IComment['id'], isLocked: boolean) => void;
|
||||
}
|
||||
|
||||
const CommentContext = createContext<CommentProviderProps>({
|
||||
// user: EMPTY_USER,
|
||||
comments: [],
|
||||
count: 0,
|
||||
hasMore: false,
|
||||
lastSeenCurrent: undefined,
|
||||
isLoading: false,
|
||||
onSaveComment: async () => {},
|
||||
onShowImageModal: () => {},
|
||||
onLoadMoreComments: () => {},
|
||||
onDeleteComment: () => {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue