fix: Flakyness on pages that use a hard refresh (#16752)
* fix: Flakyness on pages that use a hard refres Signed-off-by: zomars <[email protected]> * Update Shell.tsx --------- Signed-off-by: zomars <[email protected]>
This commit is contained in:
1 parent
1a60afad7a
commit
6dd8812a19
9 files changed
+21
-16
No files matched your search
@@ -56,6 +56,7 @@ import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
|
||||
import { useCopy } from "@calcom/lib/hooks/useCopy";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { ButtonState, useNotifications } from "@calcom/lib/hooks/useNotifications";
|
||||
import { useRefreshData } from "@calcom/lib/hooks/useRefreshData";
|
||||
import useTheme from "@calcom/lib/hooks/useTheme";
|
||||
import { isKeyInObject } from "@calcom/lib/isKeyInObject";
|
||||
import { localStorage } from "@calcom/lib/webstorage";
|
||||
@@ -1286,6 +1287,7 @@ function ProfileDropdown() {
|
||||
const { update, data: sessionData } = useSession();
|
||||
const { data } = trpc.viewer.me.useQuery();
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const refreshData = useRefreshData();
|
||||
|
||||
if (!data || !ENABLE_PROFILE_SWITCHER || !sessionData) {
|
||||
return null;
|
||||
@@ -1349,7 +1351,7 @@ function ProfileDropdown() {
|
||||
update({
|
||||
upId: option.value,
|
||||
}).then(() => {
|
||||
window.location.reload();
|
||||
refreshData();
|
||||
});
|
||||
}}
|
||||
className={classNames("flex w-full", isSelected ? "bg-subtle text-emphasis" : "")}>
|
||||
|
||||
Reference in new issue
Block a user