[Utopian Dev] Enable Moderator to Repository Inline Edit

Words
79
Reading
1 min
Listen
Play
9y

image.png

This is another installment for the implementation of the feature of adding inline edit functionalities for moderators. This contribution is to enable inline editing of a contribution's repository.

New Features

  • Enabled Inline Edit of Repository

moderator-inline-edit-repo-2.gif

  export const moderatorAction = (
      author,
      permlink,
      moderator,
      status,
      questions = [],
      score = 0,
      type,
      repository,
    ) => dispatch => dispatch(
        moderatorActionRequest(
            author,
            permlink,
            moderator,
            status,
            questions,
            score,
            type,
      repository,
        )
    );

Added the repository parameter to moderatorActionRequest(). This will pass the newly inputted repository to the backend API.

        {' '} <b>&middot;</b> {'  '} <a href={`https://github.com/${repository.full_name}`}>
        { isModerator ?
           :
          <Link to={`/project/${repository.full_name}/${platform}/${id}/all`}>{parsedRepoName(repository.owner.login, repository.name)}</Link>
        }

Added condition to display repository inline editor when user is a moderator.

Component to display the repository inline editor.



Posted on Utopian.io - Rewarding Open Source Contributors

[Utopian Dev] Enable Moderator to Repository Inline Edit | Ecency