Dismiss the avatar menu after selecting "Update Signal"
This commit is contained in:
parent
6e5d9f5dd8
commit
2ee15cdfa7
3 changed files with 8 additions and 5 deletions
|
@ -45,12 +45,12 @@ const useProps = (overrideProps: Partial<Props> = {}): Props => ({
|
|||
isMe: true,
|
||||
noteToSelf: boolean('noteToSelf', overrideProps.noteToSelf || false),
|
||||
onEditProfile: action('onEditProfile'),
|
||||
onStartUpdate: action('startUpdate'),
|
||||
onViewArchive: action('onViewArchive'),
|
||||
onViewPreferences: action('onViewPreferences'),
|
||||
phoneNumber: text('phoneNumber', overrideProps.phoneNumber || ''),
|
||||
profileName: text('profileName', overrideProps.profileName || ''),
|
||||
sharedGroupNames: [],
|
||||
startUpdate: action('startUpdate'),
|
||||
style: {},
|
||||
theme: React.useContext(StorybookThemeContext),
|
||||
title: text('title', overrideProps.title || ''),
|
||||
|
|
|
@ -16,9 +16,9 @@ export type Props = {
|
|||
readonly theme: ThemeType;
|
||||
|
||||
hasPendingUpdate: boolean;
|
||||
startUpdate: () => unknown;
|
||||
|
||||
onEditProfile: () => unknown;
|
||||
onStartUpdate: () => unknown;
|
||||
onViewPreferences: () => unknown;
|
||||
onViewArchive: () => unknown;
|
||||
|
||||
|
@ -34,11 +34,11 @@ export function AvatarPopup(props: Props): JSX.Element {
|
|||
i18n,
|
||||
name,
|
||||
onEditProfile,
|
||||
onStartUpdate,
|
||||
onViewArchive,
|
||||
onViewPreferences,
|
||||
phoneNumber,
|
||||
profileName,
|
||||
startUpdate,
|
||||
style,
|
||||
title,
|
||||
} = props;
|
||||
|
@ -105,7 +105,7 @@ export function AvatarPopup(props: Props): JSX.Element {
|
|||
<button
|
||||
type="button"
|
||||
className="module-avatar-popup__item"
|
||||
onClick={startUpdate}
|
||||
onClick={onStartUpdate}
|
||||
>
|
||||
<div
|
||||
className={classNames(
|
||||
|
|
|
@ -173,13 +173,16 @@ export function MainHeader({
|
|||
title={title}
|
||||
avatarPath={avatarPath}
|
||||
hasPendingUpdate={hasPendingUpdate}
|
||||
startUpdate={startUpdate}
|
||||
// See the comment above about `sharedGroupNames`.
|
||||
sharedGroupNames={[]}
|
||||
onEditProfile={() => {
|
||||
toggleProfileEditor();
|
||||
setShowAvatarPopup(false);
|
||||
}}
|
||||
onStartUpdate={() => {
|
||||
startUpdate();
|
||||
setShowAvatarPopup(false);
|
||||
}}
|
||||
onViewPreferences={() => {
|
||||
showSettings();
|
||||
setShowAvatarPopup(false);
|
||||
|
|
Loading…
Reference in a new issue