From 90107ebe1b2b50494da381dc481053c3f255c221 Mon Sep 17 00:00:00 2001 From: Nick Kao <45542006+NicholasKao1029@users.noreply.github.com> Date: Mon, 29 Jan 2024 05:40:19 -0800 Subject: [PATCH] change to show npm install instead of copying file (#5) --- web/src/components/DeploymentDisplay.tsx | 41 ++++++++++++------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/web/src/components/DeploymentDisplay.tsx b/web/src/components/DeploymentDisplay.tsx index 257545f..08afc39 100644 --- a/web/src/components/DeploymentDisplay.tsx +++ b/web/src/components/DeploymentDisplay.tsx @@ -118,15 +118,12 @@ export function DeploymentDisplay({
- Copy and paste the ComfyDeployClient form  - - here - + Install the node comfydeploy SDK + + Initialize your client
0) { codeTemplate = codeTemplate.replace( "inputs: {}", - `inputs: ${JSON.stringify( - Object.fromEntries( - inputs.map((x) => { - return [x?.input_id, ""]; - }), - ), - null, - 2, - ) - .split("\n") - .map((line, index) => (index === 0 ? line : ` ${line}`)) // Add two spaces indentation except for the first line - .join("\n")}`, + `inputs: ${ + JSON.stringify( + Object.fromEntries( + inputs.map((x) => { + return [x?.input_id, ""]; + }), + ), + null, + 2, + ) + .split("\n") + .map((line, index) => (index === 0 ? line : ` ${line}`)) // Add two spaces indentation except for the first line + .join("\n") + }`, ); } else { codeTemplate = codeTemplate.replace(