Skip to content

Commit

Permalink
app/components/ErrorDisplay: added some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rugvip committed Mar 23, 2020
1 parent bdaa603 commit 392fc2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/app/src/components/ErrorDisplay/ErrorDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<SubscriberFunc>();

Expand All @@ -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<Props> = ({ forwarder }) => {
const [errors, setErrors] = useState<Array<Error>>([]);

Expand Down

0 comments on commit 392fc2a

Please sign in to comment.