mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
migrate core plugins from flow to typescript
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import React, { Component } from "react";
|
||||
import { Route, Redirect, withRouter, RouteComponentProps } from "react-router-dom";
|
||||
import { Route, Redirect, withRouter, RouteComponentProps, RouteProps } from "react-router-dom";
|
||||
|
||||
type Props = RouteComponentProps & {
|
||||
authenticated?: boolean;
|
||||
component: Component<any, any>;
|
||||
};
|
||||
type Props = RouteComponentProps &
|
||||
RouteProps & {
|
||||
authenticated?: boolean;
|
||||
};
|
||||
|
||||
class ProtectedRoute extends React.Component<Props> {
|
||||
class ProtectedRoute extends Component<Props> {
|
||||
renderRoute = (Component: any, authenticated?: boolean) => {
|
||||
return (routeProps: any) => {
|
||||
if (authenticated) {
|
||||
|
||||
@@ -11,8 +11,8 @@ type Props = {
|
||||
autofocus?: boolean;
|
||||
onChange: (value: string, name?: string) => void;
|
||||
onReturnPressed?: () => void;
|
||||
validationError: boolean;
|
||||
errorMessage: string;
|
||||
validationError?: boolean;
|
||||
errorMessage?: string;
|
||||
disabled?: boolean;
|
||||
helpText?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user