signal-desktop/ts/components/GlobalModalContainer.tsx

21 lines
437 B
TypeScript
Raw Normal View History

2021-05-28 16:15:17 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
type PropsType = {
2021-07-19 19:26:06 +00:00
// ProfileEditor
isProfileEditorVisible: boolean;
renderProfileEditor: () => JSX.Element;
2021-05-28 16:15:17 +00:00
};
export const GlobalModalContainer = ({
2021-07-19 19:26:06 +00:00
// ProfileEditor
isProfileEditorVisible,
renderProfileEditor,
2021-05-28 16:15:17 +00:00
}: PropsType): JSX.Element | null => {
2021-07-19 19:26:06 +00:00
if (isProfileEditorVisible) {
return renderProfileEditor();
}
2021-05-28 16:15:17 +00:00
return null;
};