Edit profile

This commit is contained in:
Josh Perez
2021-07-19 15:26:06 -04:00
committed by GitHub
parent f14c426170
commit cd35a29638
42 changed files with 2124 additions and 356 deletions

View File

@@ -7,16 +7,28 @@ import { LocalizerType } from '../types/Util';
type PropsType = {
i18n: LocalizerType;
// ChatColorPicker
isChatColorEditorVisible: boolean;
renderChatColorPicker: () => JSX.Element;
toggleChatColorEditor: () => unknown;
// ProfileEditor
isProfileEditorVisible: boolean;
renderProfileEditor: () => JSX.Element;
};
export const GlobalModalContainer = ({
i18n,
// ChatColorPicker
isChatColorEditorVisible,
renderChatColorPicker,
toggleChatColorEditor,
// ProfileEditor
isProfileEditorVisible,
renderProfileEditor,
}: PropsType): JSX.Element | null => {
if (isChatColorEditorVisible) {
return (
@@ -33,5 +45,9 @@ export const GlobalModalContainer = ({
);
}
if (isProfileEditorVisible) {
return renderProfileEditor();
}
return null;
};