diff --git a/src/components/pages/dashboard/NewDomainPage/cmp.tsx b/src/components/pages/dashboard/NewDomainPage/cmp.tsx index c6472aa4..17e71606 100644 --- a/src/components/pages/dashboard/NewDomainPage/cmp.tsx +++ b/src/components/pages/dashboard/NewDomainPage/cmp.tsx @@ -4,7 +4,7 @@ import Container from '@/components/common/CenteredContainer' import ExternalLinkButton from '@/components/common/ExternalLinkButton' import { NoisyContainer } from '@aleph-front/aleph-core' import Form from '@/components/form/Form' -import { EntityType, EntityTypeName } from '@/helpers/constants' +import { EntityType, EntityTypeName, AddDomainTarget } from '@/helpers/constants' import { useNewDomainPage } from '@/hooks/pages/dashboard/useNewDomainPage' import { Button, @@ -24,15 +24,24 @@ export default function NewDomain() { hasFunctions, hasInstances, nameCtrl, - programTypeCtrl, + targetCtrl, refCtrl, - ipfsRefCtrl, errors, handleSubmit, + setTarget } = useNewDomainPage() const [tabId, setTabId] = useState('compute') + const onTabChange = (tabId) => { + setTabId(tabId) + if (tabId == "ipfs") { + setTarget(AddDomainTarget.IPFS) + } else { + setTarget(AddDomainTarget.INSTANCE) + } + } + return ( <>