Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hocgin committed Sep 20, 2024
1 parent c88ba39 commit 93f8237
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Promise/components/UserAvatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const UserAvatar: React.FC<{
prefixCls?: string;
className?: string;
defaultParams?: UserAvatarParams;
onLogout?: () => void;
}> = (props, ref) => {
let { getPrefixCls } = React.useContext(ConfigContext);
let prefixCls = getPrefixCls('promise--UserAvatar', props.prefixCls);
Expand All @@ -67,7 +68,7 @@ const UserAvatar: React.FC<{
<Menu.Divider />
<Menu.Item
icon={<ExportOutlined />}
onClick={() => PromiseKit.DoveService.logout()}
onClick={props?.onLogout ?? PromiseKit.DoveService.logout}
>
退出
</Menu.Item>
Expand Down

0 comments on commit 93f8237

Please sign in to comment.