ETASCOM CRM V3 - Documentation API
Storybook
GitHub
Preparing search index...
hooks/use-post-actions
usePostActions
Function usePostActions
usePostActions
()
:
{
loading
:
boolean
;
error
:
string
|
null
;
createPost
:
(
data
:
CreatePostData
)
=>
Promise
<
Post
|
null
>
;
updatePost
:
(
id
:
string
,
data
:
UpdatePostData
)
=>
Promise
<
Post
|
null
>
;
deletePost
:
(
id
:
string
)
=>
Promise
<
boolean
>
;
toggleLike
:
(
postId
:
string
,
)
=>
Promise
<
{
liked
:
boolean
;
likesCount
:
number
}
|
null
>
;
addComment
:
(
postId
:
string
,
data
:
CreateCommentData
,
)
=>
Promise
<
PostComment
|
null
>
;
deleteComment
:
(
postId
:
string
,
commentId
:
string
)
=>
Promise
<
boolean
>
;
getComments
:
(
postId
:
string
)
=>
Promise
<
PostComment
[]
>
;
}
Returns
{
loading
:
boolean
;
error
:
string
|
null
;
createPost
:
(
data
:
CreatePostData
)
=>
Promise
<
Post
|
null
>
;
updatePost
:
(
id
:
string
,
data
:
UpdatePostData
)
=>
Promise
<
Post
|
null
>
;
deletePost
:
(
id
:
string
)
=>
Promise
<
boolean
>
;
toggleLike
:
(
postId
:
string
,
)
=>
Promise
<
{
liked
:
boolean
;
likesCount
:
number
}
|
null
>
;
addComment
:
(
postId
:
string
,
data
:
CreateCommentData
,
)
=>
Promise
<
PostComment
|
null
>
;
deleteComment
:
(
postId
:
string
,
commentId
:
string
)
=>
Promise
<
boolean
>
;
getComments
:
(
postId
:
string
)
=>
Promise
<
PostComment
[]
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Storybook
GitHub
ETASCOM CRM V3 - Documentation API
Loading...