Skip to content

Commit

Permalink
FR-13417 - Fixed include query param after signup
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvalotem1 committed Nov 6, 2023
1 parent bfac61d commit 66dfe7f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/react/src/FronteggProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AppHolder } from '@frontegg/js/AppHolder';
import { useQueryKeeper } from './queryKeeper';
import { isAuthRoute } from '@frontegg/redux-store';
import sdkVersion from './sdkVersion';
import ReactPkg from 'react/package.json'
import ReactPkg from 'react/package.json';

export type FronteggProviderProps = FronteggAppOptions & {
appName?: string;
Expand Down Expand Up @@ -99,7 +99,12 @@ export const Connector: FC<ConnectorProps> = ({ history, appName, isExternalHist
return (
<FronteggStoreProvider
{...({ ...props, app } as any)}
alwaysVisibleChildren={<CustomComponentRegister app={app} themeOptions={props.themeOptions} />}
alwaysVisibleChildren={
<>
<CustomComponentRegister app={app} themeOptions={props.themeOptions} />
{!isExternalHistory && <QueryKeeperWrapper history={history} />}
</>
}
/>
);
};
Expand All @@ -109,8 +114,7 @@ export const FronteggProvider: FC<FronteggProviderProps> = (props) => {

if (props.history || history) {
return (
<Connector history={props.history || history} {...props}>
{!props.history && <QueryKeeperWrapper history={history} />}
<Connector history={props.history || history} isExternalHistory={!!props.history} {...props}>
{props.children}
</Connector>
);
Expand Down

0 comments on commit 66dfe7f

Please sign in to comment.