mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-06 03:33:02 +03:00
Updated to airbnb coding styles
This commit is contained in:
parent
4e9b19afd1
commit
a2df486280
239 changed files with 2210 additions and 3549 deletions
src/common
|
@ -6,7 +6,7 @@ interface ErrorHandlerState {
|
|||
hasError: boolean;
|
||||
}
|
||||
|
||||
const ErrorHandler = (
|
||||
const ErrorHandlerCreator = (
|
||||
{ location }: Window,
|
||||
{ error }: Console,
|
||||
) => class ErrorHandler extends Component<any, ErrorHandlerState> {
|
||||
|
@ -26,7 +26,8 @@ const ErrorHandler = (
|
|||
}
|
||||
|
||||
public render(): ReactNode {
|
||||
if (this.state.hasError) {
|
||||
const { hasError } = this.state;
|
||||
if (hasError) {
|
||||
return (
|
||||
<div className="home">
|
||||
<SimpleCard className="p-4">
|
||||
|
@ -39,8 +40,9 @@ const ErrorHandler = (
|
|||
);
|
||||
}
|
||||
|
||||
return this.props.children;
|
||||
const { children } = this.props;
|
||||
return children;
|
||||
}
|
||||
};
|
||||
|
||||
export default ErrorHandler;
|
||||
export default ErrorHandlerCreator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue