From 10a0254f4e79ec1a0e34520cf4aa2152f89f4170 Mon Sep 17 00:00:00 2001 From: Humenius Date: Tue, 12 Jan 2021 12:42:52 +0100 Subject: [PATCH] feature(database-connection): Refactor ErrorContainer.tsx to functional components --- .../ErrorContainer/ErrorContainer.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/ErrorContainer/ErrorContainer.tsx b/frontend/src/components/ErrorContainer/ErrorContainer.tsx index db80d45..3ef6638 100644 --- a/frontend/src/components/ErrorContainer/ErrorContainer.tsx +++ b/frontend/src/components/ErrorContainer/ErrorContainer.tsx @@ -1,19 +1,14 @@ import React from 'react'; import './ErrorContainer.scss'; -export interface ErrorContainerProperties { - message: string -} +const ErrorContainer: React.FC = (props: IErrorContainerProps) => ( +
+ {props.message} +
+) -class ErrorContainer extends React.Component { - - render() { - return ( -
- { this.props.message } -
- ) - } +export interface IErrorContainerProps { + message: string } export default ErrorContainer;