1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00
unleash.unleash/frontend/src/component/onboarding/dialog/SdkConnection.tsx
Jaanus Sellin 4397af0df7
chore: move onboarding flow and dialog under same location (#8272)
It is mostly moving the onboarding folders under same directory for more
clear project structure.
2024-09-26 12:56:49 +03:00

35 lines
851 B
TypeScript

import { Suspense } from 'react';
import Loader from 'component/common/Loader/Loader';
import TestSdkConnection from './TestSdkConnection';
import type { Sdk } from './sharedTypes';
import { SdkConnected } from './SdkConnected';
interface ISdkConnectionProps {
sdk: Sdk;
apiKey: string;
feature?: string;
onSdkChange: () => void;
}
export const SdkConnection = ({
sdk,
apiKey,
feature,
onSdkChange,
}: ISdkConnectionProps) => {
return (
<Suspense fallback={<Loader />}>
{feature ? (
<TestSdkConnection
sdk={sdk}
apiKey={apiKey}
feature={feature}
onSdkChange={onSdkChange}
/>
) : (
<SdkConnected sdk={sdk} />
)}
</Suspense>
);
};