From 03349f8517f008f074aad7519dee6ee7a19c5756 Mon Sep 17 00:00:00 2001 From: KevIsDev Date: Mon, 7 Apr 2025 23:07:58 +0100 Subject: [PATCH] refactor: remove success toast and prioritize public domain URL Remove redundant success toast messages from Vercel and Netlify deploy components. Additionally, prioritize the public domain URL over the private domain in the Vercel deploy action for consistency and clarity. --- app/components/deploy/NetlifyDeploy.client.tsx | 14 -------------- app/components/deploy/VercelDeploy.client.tsx | 9 --------- app/routes/api.vercel-deploy.ts | 4 +++- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/app/components/deploy/NetlifyDeploy.client.tsx b/app/components/deploy/NetlifyDeploy.client.tsx index f88751cc..62b95f44 100644 --- a/app/components/deploy/NetlifyDeploy.client.tsx +++ b/app/components/deploy/NetlifyDeploy.client.tsx @@ -224,20 +224,6 @@ export function useNetlifyDeploy() { source: 'netlify', }); - toast.success( -
- Deployed successfully!{' '} - - View site - -
, - ); - return true; } catch (error) { console.error('Deploy error:', error); diff --git a/app/components/deploy/VercelDeploy.client.tsx b/app/components/deploy/VercelDeploy.client.tsx index a6b53a42..22ceb393 100644 --- a/app/components/deploy/VercelDeploy.client.tsx +++ b/app/components/deploy/VercelDeploy.client.tsx @@ -174,15 +174,6 @@ export function useVercelDeploy() { source: 'vercel', }); - toast.success( -
- Deployed successfully to Vercel!{' '} - - View site - -
, - ); - return true; } catch (err) { console.error('Vercel deploy error:', err); diff --git a/app/routes/api.vercel-deploy.ts b/app/routes/api.vercel-deploy.ts index c9f6909d..7d45b241 100644 --- a/app/routes/api.vercel-deploy.ts +++ b/app/routes/api.vercel-deploy.ts @@ -237,7 +237,9 @@ export async function action({ request }: ActionFunctionArgs) { deploy: { id: deployData.id, state: deploymentState, - url: deploymentUrl || projectInfo.url, + + // Return public domain as deploy URL and private domain as fallback. + url: projectInfo.url || deploymentUrl, }, project: projectInfo, });