From 6239524e39c2e9c13854ae42afed4a6397796f96 Mon Sep 17 00:00:00 2001 From: lelenei Date: Tue, 26 Apr 2022 22:49:29 +0800 Subject: [PATCH] fix(ins): keep refreshing the web3 page --- .../components/InjectedComponents/ProfileTabContent.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mask/src/components/InjectedComponents/ProfileTabContent.tsx b/packages/mask/src/components/InjectedComponents/ProfileTabContent.tsx index cfe42258a49b..e2943e969864 100644 --- a/packages/mask/src/components/InjectedComponents/ProfileTabContent.tsx +++ b/packages/mask/src/components/InjectedComponents/ProfileTabContent.tsx @@ -103,19 +103,19 @@ export function ProfileTabContent(props: ProfileTabContentProps) { useUpdateEffect(() => { setSelectedTab(undefined) - }, [identity.identifier]) + }, [identity.identifier.userId]) useEffect(() => { return MaskMessages.events.profileTabHidden.on((data) => { if (data.hidden) setHidden(data.hidden) }) - }, [identity]) + }, [identity.identifier.userId]) useEffect(() => { return MaskMessages.events.profileTabUpdated.on((data) => { setHidden(!data.show) }) - }, [identity]) + }, [identity.identifier.userId]) const ContentComponent = useMemo(() => { const tabId = @@ -123,7 +123,7 @@ export function ProfileTabContent(props: ProfileTabContentProps) { ? displayPlugins?.find((tab) => tab?.pluginID === PluginId.NextID)?.ID : selectedTabId return getTabContent(tabId ?? '') - }, [selectedTabId, identity.identifier.userId, tabs]) + }, [selectedTabId, identity.identifier.userId]) if (hidden) return null