Navigate to success page after auction creation

This commit is contained in:
IshaVenikar 2024-10-08 13:56:09 +05:30 committed by Nabarun
parent ee2c8d098a
commit 8ae1aec468
5 changed files with 36 additions and 23 deletions

View File

@ -30,7 +30,8 @@
[registryConfig] [registryConfig]
fetchDeploymentRecordDelay = 5000 fetchDeploymentRecordDelay = 5000
checkAuctionStatusDelay = 5000 checkAuctionStatusDelay = 5000
restEndpoint = "http://dss-daemon.test1.wireitin.com:26657" restEndpoint = "http://localhost:1317"
gqlEndpoint = "http://localhost:9473/api"
chainId = "laconic_9000-1" chainId = "laconic_9000-1"
privateKey = "" privateKey = ""
bondId = "" bondId = ""

View File

@ -266,7 +266,7 @@ export class Service {
} }
/** /**
* Checks for auction status for all ongoing auctions * Checks the status for all ongoing auctions
* Calls the createDeploymentFromAuction method for deployments with completed auctions * Calls the createDeploymentFromAuction method for deployments with completed auctions
*/ */
async checkAuctionStatus(): Promise<void> { async checkAuctionStatus(): Promise<void> {

View File

@ -74,7 +74,15 @@ const Configure = () => {
auctionData auctionData
); );
navigate(`/${orgSlug}/projects/create/template/deploy?projectId=${addProjectFromTemplate.id}&templateId=${templateId}`); data.option === 'Auction'
? navigate(
`/${orgSlug}/projects/create/success/${addProjectFromTemplate.id}`,
{
state: {
isAuction: true
}
})
: navigate(`/${orgSlug}/projects/create/template/deploy?projectId=${addProjectFromTemplate.id}&templateId=${templateId}`);
} catch (error) { } catch (error) {
console.error('Error creating project:', error); console.error('Error creating project:', error);
toast({ toast({

View File

@ -1,4 +1,4 @@
import { Link, useParams } from 'react-router-dom'; import { Link, useLocation, useParams } from 'react-router-dom';
import Lottie from 'lottie-react'; import Lottie from 'lottie-react';
import { Badge } from 'components/shared/Badge'; import { Badge } from 'components/shared/Badge';
@ -19,6 +19,8 @@ const Id = () => {
const { id, orgSlug } = useParams(); const { id, orgSlug } = useParams();
const client = useGQLClient(); const client = useGQLClient();
const [project, setProject] = useState<Project | null>(null); const [project, setProject] = useState<Project | null>(null);
const location = useLocation();
const { isAuction } = location.state || {};
const handleSetupDomain = async () => { const handleSetupDomain = async () => {
if (id) { if (id) {
@ -51,8 +53,9 @@ const Id = () => {
{/* Heading */} {/* Heading */}
<div className="flex flex-col items-center gap-1.5"> <div className="flex flex-col items-center gap-1.5">
<Heading as="h3" className="font-medium text-xl"> <Heading as="h3" className="font-medium text-xl">
Project deployed successfully. {isAuction? 'Project created successfully.' : 'Project deployed successfully.'}
</Heading> </Heading>
{!isAuction && (
<p className="flex flex-col items-center lg:flex-row font-sans gap-0.5 lg:gap-2 text-sm text-elements-high-em"> <p className="flex flex-col items-center lg:flex-row font-sans gap-0.5 lg:gap-2 text-sm text-elements-high-em">
Your project has been deployed at{' '} Your project has been deployed at{' '}
<Button <Button
@ -67,6 +70,7 @@ const Id = () => {
{project.subDomain} {project.subDomain}
</Button> </Button>
</p> </p>
)}
</div> </div>
{/* Card */} {/* Card */}

View File

@ -1431,10 +1431,10 @@
resolved "https://registry.yarnpkg.com/@bugsnag/safe-json-stringify/-/safe-json-stringify-6.0.0.tgz#22abdcd83e008c369902976730c34c150148a758" resolved "https://registry.yarnpkg.com/@bugsnag/safe-json-stringify/-/safe-json-stringify-6.0.0.tgz#22abdcd83e008c369902976730c34c150148a758"
integrity sha512-htzFO1Zc57S8kgdRK9mLcPVTW1BY2ijfH7Dk2CeZmspTWKdKqSo1iwmqrq2WtRjFlo8aRZYgLX0wFrDXF/9DLA== integrity sha512-htzFO1Zc57S8kgdRK9mLcPVTW1BY2ijfH7Dk2CeZmspTWKdKqSo1iwmqrq2WtRjFlo8aRZYgLX0wFrDXF/9DLA==
"@cerc-io/registry-sdk@^0.2.5": "@cerc-io/registry-sdk@^0.2.11":
version "0.2.10" version "0.2.11"
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.10/registry-sdk-0.2.10.tgz#15773ea36a862585cdcb0991cbf075736f845f96" resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.11/registry-sdk-0.2.11.tgz#019b792c68f440f2cfca5af2f49e1205bb33ba72"
integrity sha512-xxVD7ylrN951TFoSFbluz7mt4SwSCv7z+yry3jGd8v8TWnycoBMMrrYSTfETs6Ydxwziiz/uLrRwk59vFZxLEA== integrity sha512-IipqJzaBQEXMNH6yWFG2E/o0U6IAXw35PBMHx6QIboVu/sMNLIsWy1P8MmR8C8xYsmHOhgXLsC4hYSeFMXrqFw==
dependencies: dependencies:
"@cosmjs/amino" "^0.28.1" "@cosmjs/amino" "^0.28.1"
"@cosmjs/crypto" "^0.28.1" "@cosmjs/crypto" "^0.28.1"