1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

moved comments load to hook

This commit is contained in:
Fedor Katurov 2021-09-20 11:56:20 +07:00
parent 5e1e575ee3
commit 639c952c2c
11 changed files with 184 additions and 59 deletions

View file

@ -1,5 +1,6 @@
import { IComment, INode } from '~/redux/types';
import { ISocialProvider } from '~/redux/auth/types';
import { COMMENTS_DISPLAY } from '~/redux/node/constants';
export const API = {
BASE: process.env.REACT_APP_API_HOST,
@ -28,6 +29,8 @@ export const API = {
GET_NODE: (id: number | string) => `/node/${id}`,
COMMENT: (id: INode['id']) => `/node/${id}/comment`,
COMMENT_INFINITE: (id: INode['id'], skip: number) =>
`/node/${id}/comment?take=${COMMENTS_DISPLAY}&skip=${skip}`,
RELATED: (id: INode['id']) => `/node/${id}/related`,
UPDATE_TAGS: (id: INode['id']) => `/node/${id}/tags`,
POST_LIKE: (id: INode['id']) => `/node/${id}/like`,