This is an installment for the implementation of the feature of adding inline edit functionalities for moderators. This is an implementation in partnership with @sirfreeman.
New Features
- Enabled Moderator to Edit Contribution Category Inline
export const moderatorAction = (
author,
permlink,
moderator,
status,
questions = [],
score = 0,
type,
) => dispatch => dispatch(
moderatorActionRequest(
author,
permlink,
moderator,
status,
questions,
score,
type,
)
);
Added the type
(category type) parameter to moderatorActionRequest()
. This will pass the new (selected) category type to the backend API.
<span className={`Contribution__c-${(fullMode === false) ? type : "yes-full"}`}>
<CategoryIcon from="from-story" type={type}/>
{ isModerator ?
<InlineCategoryEdit
value={type}
types={types}
post={post}
moderatorAction={moderatorAction}
user={user}
/> :
categorySlug(type)
}
</span>
Added condition to display inline editor when user is a moderator.
Component to display the category inline editor.
Posted on Utopian.io - Rewarding Open Source Contributors