signal-desktop/ts/components/GlobalModalContainer.tsx
2021-08-18 13:08:14 -07:00

20 lines
437 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
type PropsType = {
// ProfileEditor
isProfileEditorVisible: boolean;
renderProfileEditor: () => JSX.Element;
};
export const GlobalModalContainer = ({
// ProfileEditor
isProfileEditorVisible,
renderProfileEditor,
}: PropsType): JSX.Element | null => {
if (isProfileEditorVisible) {
return renderProfileEditor();
}
return null;
};