mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
fixed eslint failures
This commit is contained in:
@@ -97,14 +97,14 @@ export const logoutPending = () => {
|
|||||||
|
|
||||||
export const logoutSuccess = () => {
|
export const logoutSuccess = () => {
|
||||||
return {
|
return {
|
||||||
type: LOGOUT_SUCCESS,
|
type: LOGOUT_SUCCESS
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const redirectAfterLogout = () => {
|
export const redirectAfterLogout = () => {
|
||||||
return {
|
return {
|
||||||
type: LOGOUT_REDIRECT
|
type: LOGOUT_REDIRECT
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const logoutFailure = (error: Error) => {
|
export const logoutFailure = (error: Error) => {
|
||||||
@@ -277,4 +277,3 @@ export const getLogoutFailure = (state: Object) => {
|
|||||||
export const isRedirecting = (state: Object) => {
|
export const isRedirecting = (state: Object) => {
|
||||||
return !!stateAuth(state).redirecting;
|
return !!stateAuth(state).redirecting;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import type {
|
|||||||
import { isPending } from "../../../modules/pending";
|
import { isPending } from "../../../modules/pending";
|
||||||
import { getFailure } from "../../../modules/failure";
|
import { getFailure } from "../../../modules/failure";
|
||||||
|
|
||||||
import memoizeOne from 'memoize-one';
|
import memoizeOne from "memoize-one";
|
||||||
|
|
||||||
export const FETCH_BRANCHES = "scm/repos/FETCH_BRANCHES";
|
export const FETCH_BRANCHES = "scm/repos/FETCH_BRANCHES";
|
||||||
export const FETCH_BRANCHES_PENDING = `${FETCH_BRANCHES}_${PENDING_SUFFIX}`;
|
export const FETCH_BRANCHES_PENDING = `${FETCH_BRANCHES}_${PENDING_SUFFIX}`;
|
||||||
@@ -111,9 +111,7 @@ export function createBranch(
|
|||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
function collectBranches(repoState) {
|
function collectBranches(repoState) {
|
||||||
return repoState.list._embedded.branches.map(
|
return repoState.list._embedded.branches.map(name => repoState.byName[name]);
|
||||||
name => repoState.byName[name]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const memoizedBranchCollector = memoizeOne(collectBranches);
|
const memoizedBranchCollector = memoizeOne(collectBranches);
|
||||||
@@ -127,7 +125,12 @@ export function getBranches(state: Object, repository: Repository) {
|
|||||||
|
|
||||||
export function getBranchCreateLink(state: Object, repository: Repository) {
|
export function getBranchCreateLink(state: Object, repository: Repository) {
|
||||||
const repoState = getRepoState(state, repository);
|
const repoState = getRepoState(state, repository);
|
||||||
if (repoState && repoState.list && repoState.list._links && repoState.list._links.create) {
|
if (
|
||||||
|
repoState &&
|
||||||
|
repoState.list &&
|
||||||
|
repoState.list._links &&
|
||||||
|
repoState.list._links.create
|
||||||
|
) {
|
||||||
return repoState.list._links.create.href;
|
return repoState.list._links.create.href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user