Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update selectors.js #221

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions webapp/src/selectors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {getConfig} from 'mattermost-redux/selectors/entities/general';

import {id as pluginId} from './manifest';
import { getConfig } from 'mattermost-redux/selectors/entities/general';

Check failure on line 1 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

There should be at least one empty line between import groups

Check failure on line 1 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

There should be no space after '{'

Check failure on line 1 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

There should be no space before '}'
import { id as pluginId } from './manifest';

Check failure on line 2 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

There should be no space after '{'

Check failure on line 2 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

There should be no space before '}'

const getPluginState = (state) => state['plugins-' + pluginId] || {};

Expand All @@ -14,14 +13,14 @@
export const getTodoToast = (state) => getPluginState(state).todoToast;
export const getShowRHSAction = (state) => getPluginState(state).rhsPluginAction;
export const getMessage = (state) => {
const postID = getPluginState(state).postID;
if (!postID) {
return '';
}
const post = state.entities.posts.posts[postID];
if (!post) {
return '';
}
const postID = getPluginState(state).postID;

Check failure on line 16 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

Expected indentation of 4 spaces but found 3

Check failure on line 16 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

Trailing spaces not allowed
if (!postID) {

Check failure on line 17 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

Expected indentation of 4 spaces but found 0
return '';

Check failure on line 18 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

Expected indentation of 8 spaces but found 3
}

Check failure on line 19 in webapp/src/selectors.js

View workflow job for this annotation

GitHub Actions / plugin-ci / lint

Expected indentation of 4 spaces but found 0
const post = state.entities.posts.posts[postID];
if (!post) {
return '';
}
return post.message;
};
export const getIssues = (state) => getPluginState(state).issues;
Expand Down