Skip to content

Commit

Permalink
fix(clerk-js): Wrap ImpersonationFab with withCoreSessionSwitchGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosdouvlis committed Oct 25, 2022
1 parent 7c08a91 commit 1d7cea9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { PointerEventHandler, useEffect, useRef } from 'react';

import { mqu, PropsOfComponent } from '../../ui/styledSystem';
import { getFullName, getIdentifier } from '../../ui/utils';
import { useCoreClerk, useCoreSession } from '../contexts';
import { useCoreClerk, useCoreSession, withCoreSessionSwitchGuard } from '../contexts';
import {
Col,
descriptors,
Expand Down Expand Up @@ -90,7 +90,7 @@ const FabContent = ({ title, signOutText }: FabContentProps) => {
);
};

export const ImpersonationFab = () => {
const _ImpersonationFab = () => {
const session = useCoreSession();
const { t } = useLocalizations();
const { parsedInternalTheme } = useAppearance();
Expand Down Expand Up @@ -227,3 +227,5 @@ export const ImpersonationFab = () => {
</Portal>
);
};

export const ImpersonationFab = withCoreSessionSwitchGuard(_ImpersonationFab);

0 comments on commit 1d7cea9

Please sign in to comment.