From 392fc2a47fa5a9628f61ca32ed81dd2e0f42fb5d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 19 Mar 2020 18:21:42 +0100 Subject: [PATCH] app/components/ErrorDisplay: added some TODOs --- packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx b/packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx index 0a67191b41a57..307158d88cd99 100644 --- a/packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx +++ b/packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx @@ -23,6 +23,8 @@ import { ErrorApi, ErrorContext } from '@spotify-backstage/core'; type SubscriberFunc = (error: Error) => void; type Unsubscribe = () => void; +// TODO: figure out where to put implementations of APIs, both inside apps +// but also in core/separate package. export class ErrorDisplayForwarder implements ErrorApi { private readonly subscribers = new Set(); @@ -47,6 +49,7 @@ type Props = { forwarder: ErrorDisplayForwarder; }; +// TODO: improve on this and promote to a shared component for use by all apps. const ErrorDisplay: FC = ({ forwarder }) => { const [errors, setErrors] = useState>([]);