Skip to content

Commit

Permalink
fix: only call project overview from connect dialog when open
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Dec 13, 2024
1 parent 8eb84e9 commit d21b1c9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frontend/src/component/onboarding/dialog/ConnectSdkDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,13 @@ const NextStepSectionSpacedContainer = styled('div')(({ theme }) => ({

type OnboardingStage = 'select-sdk' | 'generate-api-key' | 'test-connection';

export const ConnectSdkDialog = ({
open,
const InnerDialog = ({
onClose,
onFinish,
environments,
project: projectId,
feature,
}: IConnectSDKDialogProps) => {
}: Omit<IConnectSDKDialogProps, 'open'>) => {
const theme = useTheme();
const isLargeScreen = useMediaQuery(theme.breakpoints.up('lg'));
const [sdk, setSdk] = useState<Sdk | null>(null);
Expand All @@ -98,7 +97,7 @@ export const ConnectSdkDialog = ({
}, [JSON.stringify(environments)]);

return (
<StyledDialog open={open} onClose={onClose}>
<StyledDialog open={true} onClose={onClose}>
<Box sx={{ display: 'flex' }}>
<ConnectSdk>
{isSelectSdkStage ? (
Expand Down Expand Up @@ -199,3 +198,10 @@ export const ConnectSdkDialog = ({
</StyledDialog>
);
};

export const ConnectSdkDialog = ({
open,
...props
}: IConnectSDKDialogProps) => {
return open ? <InnerDialog {...props} /> : null;
};

0 comments on commit d21b1c9

Please sign in to comment.