Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only call project overview from connect dialog when open #8977

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
Loading