diff --git a/ui/src/components/DestinationStack/Summary/StacksSummary.tsx b/ui/src/components/DestinationStack/Summary/StacksSummary.tsx index 6e5fe01db..2728a0361 100644 --- a/ui/src/components/DestinationStack/Summary/StacksSummary.tsx +++ b/ui/src/components/DestinationStack/Summary/StacksSummary.tsx @@ -1,34 +1,75 @@ -import { useContext } from 'react'; +import { useContext, useState } from 'react'; import StepIcon from '../../../components/Stepper/FlowStepper/StepIcon'; import { AppContext } from '../../../context/app/app.context'; import { isEmptyString } from '../../../utilities/functions'; -import { IStep } from '../../../context/app/app.interface'; -import LoadStacks from '../Actions/LoadStacks'; +import { DEFAULT_DROPDOWN, IDropDown, INewMigration, IStep } from '../../../context/app/app.interface'; + import './summary.scss'; +import { Icon, Select } from '@contentstack/venus-components'; interface StacksSummaryProps { stepData: IStep; } -let LoadFileFormatProps: { - stepComponentProps: any; - currentStep: 1; - handleStepChange: (stepIndex: number, closeStep?: boolean) => {}; -}; const StacksSummary = (props: StacksSummaryProps): JSX.Element => { const { newMigrationData } = useContext(AppContext); + const [selectedStack, setSelectedStack] = useState( + !isEmptyString(newMigrationData?.destination_stack?.selectedOrg?.value) + ? newMigrationData?.destination_stack?.selectedStack + : DEFAULT_DROPDOWN + ); + const loadingOption = [ + { + uid: '', + label: 'Loading stacks...', + value: 'loading', + default: false, + locale: '', + created_at: '' + } + ]; + const [allStack, setAllStack] = useState(loadingOption); return (
{/* {!isEmptyString(newMigrationData?.destination_stack?.selectedStack?.label) && !isEmptyString(newMigrationData?.destination_stack?.selectedStack?.value) && ( */} -
- +
+
+
+
+
+