fix: refresh memberlist when switching account (#3814)

This commit is contained in:
Finley Ge
2025-02-18 13:54:56 +08:00
committed by GitHub
parent b14674cc6f
commit 3e13397614
3 changed files with 10 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ const MyInfo = ({ onOpenContact }: { onOpenContact: () => void }) => {
const theme = useTheme();
const { feConfigs } = useSystemStore();
const { t } = useTranslation();
const { userInfo, updateUserInfo, teamPlanStatus } = useUserStore();
const { userInfo, updateUserInfo, teamPlanStatus, initUserInfo } = useUserStore();
const { reset } = useForm<UserUpdateParams>({
defaultValues: userInfo as UserType
});
@@ -284,7 +284,7 @@ const MyInfo = ({ onOpenContact }: { onOpenContact: () => void }) => {
<Flex mt={6} alignItems={'center'}>
<Box {...labelStyles}>{t('account_info:user_team_team_name')}:&nbsp;</Box>
<Flex flex={'1 0 0'} w={0} align={'center'}>
<TeamSelector height={'28px'} w={'100%'} showManage />
<TeamSelector height={'28px'} w={'100%'} showManage afterSwitchTeam={initUserInfo} />
</Flex>
</Flex>
)}