From 8d9619308dd30f2ebd78ce570aa52b914e1a4376 Mon Sep 17 00:00:00 2001 From: Suraj Mahto Date: Sat, 29 Jun 2024 11:37:54 +0530 Subject: [PATCH] notification position changed --- src/app/create-brand/page.tsx | 28 ++++++++++++++++++------- src/app/create-phygital-detail/page.tsx | 16 ++++++++++---- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/app/create-brand/page.tsx b/src/app/create-brand/page.tsx index 5ca5e9b..856ab28 100644 --- a/src/app/create-brand/page.tsx +++ b/src/app/create-brand/page.tsx @@ -237,7 +237,9 @@ function getNumber() public view returns (uint256) { async function onSubmit(values: z.infer) { if (!account.addresses) { - toast.warning('Connect your wallet') + toast.warning('Connect your wallet', { + position: 'top-left', + }) } else { if (!imageUrl) { setImageError(true) @@ -288,15 +290,21 @@ function getNumber() public view returns (uint256) { console.log(brand) localStorage.setItem("BrandId", brand.id); if (response.status === 200) { - toast.warning('Now we are deploying AccessMaster to manage out brand') + toast.warning('Now we are deploying AccessMaster to manage out brand', { + position: 'top-left', + }) const deploySuccess = await handleDeploy(); if (deploySuccess) { // const verifySuccess = await handleVerify(); // if (verifySuccess) { - toast.warning('Now we will deploy TradeHub ') + toast.warning('Now we will deploy TradeHub ', { + position: 'top-left', + }) const deployTradeHub = await handleDeploy(); if(deployTradeHub){ - toast.success('Deploy Successful') + toast.success('Deploy Successful', { + position: 'top-left', + }) const users = await fetch(`${apiUrl}/users`, { method: 'POST', @@ -308,7 +316,9 @@ function getNumber() public view returns (uint256) { }), }) console.log(users); - toast.success('Your Brand has been created') + toast.success('Your Brand has been created', { + position: 'top-left', + }) router.push(`/congratulations?bramd_name=${values.name}`); // } } @@ -319,11 +329,15 @@ function getNumber() public view returns (uint256) { // } } else if (!imageError && imageUrl === '') { - toast.warning('Wait for your image to finish upload') + toast.warning('Wait for your image to finish upload', { + position: 'top-left', + }) } } catch (error) { console.log(error) - toast.warning('Failed to create Brand') + toast.warning('Failed to create Brand', { + position: 'top-left', + }) setLoading(false) } } diff --git a/src/app/create-phygital-detail/page.tsx b/src/app/create-phygital-detail/page.tsx index 15815c8..fdc3028 100644 --- a/src/app/create-phygital-detail/page.tsx +++ b/src/app/create-phygital-detail/page.tsx @@ -285,18 +285,26 @@ function getNumber() public view returns (uint256) { } if (phygitalResponse.status === 200) { - toast.warning('Now we are deploing phygital to launch your nft collection') + toast.warning('Now we are deploing phygital to launch your nft collection', { + position: 'top-left', + }) const deploySuccess = await handleDeploy(); if (deploySuccess) { - toast.success('Deploy Successful') + toast.success('Deploy Successful', { + position: 'top-left', + }) router.push('/create-avatar') } } else { - toast.warning('Failed to create phygital data') + toast.warning('Failed to create phygital data', { + position: 'top-left', + }) } } catch (error) { console.error(error) - toast.error('An error occurred while creating phygital data') + toast.error('An error occurred while creating phygital data', { + position: 'top-left', + }) } finally { setLoading(false) }