You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the PostDetails feature we have a dialog for the user when (s)he tries to delete a post with a confirmation message. The logic for this is still defined in the Feature itself and not in a hook.
constdeletePost=useCallback(async(post: PostView)=>{constpanel=<ConfirmationPanelmessage='Are you sure you want to delete this post?'onConfirm={()=>{closeModal();removePost(post);}}onCancel={()=>closeModal()}/>;showModal(panel);},[showModal,closeModal,removePost]);
We want to have this logic in a custom hook, but we need to figure out how we can do this.
The text was updated successfully, but these errors were encountered:
In the PostDetails feature we have a dialog for the user when (s)he tries to delete a post with a confirmation message. The logic for this is still defined in the Feature itself and not in a hook.
We want to have this logic in a custom hook, but we need to figure out how we can do this.
The text was updated successfully, but these errors were encountered: