mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
fix eslint and flow warnings
This commit is contained in:
@@ -18,8 +18,10 @@ class Paginator extends React.Component<Props> {
|
||||
createAction = (linkType: string) => () => {
|
||||
const { collection, onPageChange } = this.props;
|
||||
if (onPageChange) {
|
||||
const link = collection._links[linkType].href;
|
||||
onPageChange(link);
|
||||
const link = collection._links[linkType];
|
||||
if (link && link.href) {
|
||||
onPageChange(link.href);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//@flow
|
||||
import React from "react";
|
||||
import classNames from "classnames";
|
||||
import { Link, withRouter } from "react-router-dom";
|
||||
import { withRouter } from "react-router-dom";
|
||||
|
||||
export type ButtonProps = {
|
||||
label: string,
|
||||
@@ -17,8 +17,9 @@ export type ButtonProps = {
|
||||
type Props = ButtonProps & {
|
||||
type: string,
|
||||
color: string,
|
||||
|
||||
// context prop
|
||||
history: History
|
||||
history: any
|
||||
};
|
||||
|
||||
class Button extends React.Component<Props> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import type { Repository } from "@scm-manager/ui-types";
|
||||
import { getProtocolLinkByType, getTypePredicate } from "./repositories";
|
||||
import { getProtocolLinkByType } from "./repositories";
|
||||
|
||||
describe("getProtocolLinkByType tests", () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user