From ab26c64f7c99490a267160080fffe9c2ffb32540 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 11 Nov 2024 14:07:42 +0530 Subject: [PATCH] Remove generated files --- packages/deployer/.gitignore | 2 ++ .../application-deployment-request.yml | 18 ------------- .../deployer/records/application-record.yml | 8 ------ .../application-deployment-request.yml | 27 ------------------- .../staging-records/application-record.yml | 8 ------ .../components/projects/create/Configure.tsx | 8 +++--- .../pages/org-slug/projects/id/Overview.tsx | 18 +++++-------- 7 files changed, 14 insertions(+), 75 deletions(-) create mode 100644 packages/deployer/.gitignore delete mode 100644 packages/deployer/records/application-deployment-request.yml delete mode 100644 packages/deployer/records/application-record.yml delete mode 100644 packages/deployer/staging-records/application-deployment-request.yml delete mode 100644 packages/deployer/staging-records/application-record.yml diff --git a/packages/deployer/.gitignore b/packages/deployer/.gitignore new file mode 100644 index 00000000..ffaf3b27 --- /dev/null +++ b/packages/deployer/.gitignore @@ -0,0 +1,2 @@ +records/* +staging-records/* diff --git a/packages/deployer/records/application-deployment-request.yml b/packages/deployer/records/application-deployment-request.yml deleted file mode 100644 index 2b53d579..00000000 --- a/packages/deployer/records/application-deployment-request.yml +++ /dev/null @@ -1,18 +0,0 @@ -record: - type: ApplicationDeploymentRequest - version: '1.0.0' - name: deploy-frontend@1.0.0 - application: lrn://vaasl/applications/deploy-frontend@1.0.0 - dns: deploy - config: - env: - LACONIC_HOSTED_CONFIG_server_url: https://deploy-backend.apps.vaasl.io - LACONIC_HOSTED_CONFIG_github_clientid: Ov23liaet4yc0KX0iM1c - LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: laconic-templates/test-progressive-web-app - LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: laconic-templates/image-upload-pwa-example - LACONIC_HOSTED_CONFIG_github_next_app_templaterepo: laconic-templates/starter.nextjs-react-tailwind - LACONIC_HOSTED_CONFIG_wallet_connect_id: 63cad7ba97391f63652161f484670e15 - meta: - note: Added by Snowball @ Thu Apr 4 14:49:41 UTC 2024 - repository: "https://git.vdb.to/cerc-io/snowballtools-base" - repository_ref: 351db16336eacc3e1f9119ceb8d1282b8e27a27e diff --git a/packages/deployer/records/application-record.yml b/packages/deployer/records/application-record.yml deleted file mode 100644 index 9e23075f..00000000 --- a/packages/deployer/records/application-record.yml +++ /dev/null @@ -1,8 +0,0 @@ -record: - type: ApplicationRecord - version: 0.0.2 - repository_ref: 351db16336eacc3e1f9119ceb8d1282b8e27a27e - repository: ["https://git.vdb.to/cerc-io/snowballtools-base"] - app_type: webapp - name: deploy-frontend - app_version: 1.0.0 diff --git a/packages/deployer/staging-records/application-deployment-request.yml b/packages/deployer/staging-records/application-deployment-request.yml deleted file mode 100644 index 897c47a4..00000000 --- a/packages/deployer/staging-records/application-deployment-request.yml +++ /dev/null @@ -1,27 +0,0 @@ -record: - type: ApplicationDeploymentRequest - version: '1.0.0' - name: staging-snowballtools-base-frontend@0.0.0 - application: crn://staging-snowballtools/applications/staging-snowballtools-base-frontend@0.0.0 - dns: dashboard.staging.apps.snowballtools.com - config: - env: - LACONIC_HOSTED_CONFIG_server_url: https://snowballtools-base-api.staging.apps.snowballtools.com - LACONIC_HOSTED_CONFIG_github_clientid: Ov23liOaoahRTYd4nSCV - LACONIC_HOSTED_CONFIG_github_templaterepo: snowball-tools/test-progressive-web-app - LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: snowball-tools/test-progressive-web-app - LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: snowball-tools/image-upload-pwa-example - LACONIC_HOSTED_CONFIG_github_next_app_templaterepo: snowball-tools/starter.nextjs-react-tailwind - LACONIC_HOSTED_CONFIG_wallet_connect_id: eda9ba18042a5ea500f358194611ece2 - LACONIC_HOSTED_CONFIG_lit_relay_api_key: 15DDD969-E75F-404D-AAD9-58A37C4FD354_snowball - LACONIC_HOSTED_CONFIG_aplchemy_api_key: THvPart_gqI5x02RNYSBntlmwA66I_qc - LACONIC_HOSTED_CONFIG_bugsnag_api_key: 8c480cd5386079f9dd44f9581264a073 - LACONIC_HOSTED_CONFIG_passkey_wallet_rpid: dashboard.staging.apps.snowballtools.com - LACONIC_HOSTED_CONFIG_turnkey_api_base_url: https://api.turnkey.com - LACONIC_HOSTED_CONFIG_laconicd_chain_id: - LACONIC_HOSTED_CONFIG_wallet_iframe_url: - LACONIC_HOSTED_CONFIG_turnkey_organization_id: 5049ae99-5bca-40b3-8317-504384d4e591 - meta: - note: Added by Snowball @ Mon Jun 24 23:51:48 UTC 2024 - repository: "https://git.vdb.to/cerc-io/snowballtools-base" - repository_ref: 61e3e88a6c9d57e95441059369ee5a46f5c07601 diff --git a/packages/deployer/staging-records/application-record.yml b/packages/deployer/staging-records/application-record.yml deleted file mode 100644 index fa9b4089..00000000 --- a/packages/deployer/staging-records/application-record.yml +++ /dev/null @@ -1,8 +0,0 @@ -record: - type: ApplicationRecord - version: 0.0.1 - repository_ref: 61e3e88a6c9d57e95441059369ee5a46f5c07601 - repository: ["https://git.vdb.to/cerc-io/snowballtools-base"] - app_type: webapp - name: staging-snowballtools-base-frontend - app_version: 0.0.0 diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index f10432a9..6c500d30 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -289,14 +289,14 @@ const Configure = () => { `/${orgSlug}/projects/create/deploy?projectId=${projectId}`, ); } - } catch (error) { + } catch (error: any) { toast({ id: 'error-deploying-app', title: 'Error deploying app', variant: 'error', onDismiss: dismiss, }); - throw new Error('Error deploying app'); + throw new Error(error); } }, [client, createProject, dismiss, toast], @@ -369,6 +369,8 @@ const Configure = () => { variant: 'error', onDismiss: dismiss, }); + setIsFrameVisible(false); + setIsPaymentLoading(false); }, TX_APPROVAL_TIMEOUT_MS); }); return txHash; @@ -391,7 +393,7 @@ const Configure = () => { if (!iframe.contentWindow) { console.error('Iframe not found or not loaded'); - return; + throw new Error('Iframe not found or not loaded'); } iframe.contentWindow.postMessage( diff --git a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx index 84b1e9fd..7732a6e6 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Link, useNavigate, useOutletContext } from 'react-router-dom'; import { RequestError } from 'octokit'; @@ -24,7 +24,7 @@ import { Domain, DomainStatus } from 'gql-client'; import { AuctionCard } from 'components/projects/project/overview/Activity/AuctionCard'; const COMMITS_PER_PAGE = 4; -const WAIT_DURATION = 5000; +const PROJECT_UPDATE_WAIT_MS = 5000; const OverviewTabPanel = () => { const { octokit } = useOctokit(); @@ -96,20 +96,16 @@ const OverviewTabPanel = () => { }; fetchRepoActivity(); - }, []); - - const fetchUpdatedProject = useCallback(async () => { - await onUpdate(); - }, [onUpdate]); + }, [project.repository]); useEffect(() => { - fetchUpdatedProject(); + onUpdate(); const timerId = setInterval(() => { - fetchUpdatedProject(); - }, WAIT_DURATION); + onUpdate(); + }, PROJECT_UPDATE_WAIT_MS); return () => clearInterval(timerId); - }, [fetchUpdatedProject]); + }, [onUpdate]); useEffect(() => { const fetchLiveProdDomain = async () => {