From 2834e3d76b5c2edef3410b6e98c177e3aea752b2 Mon Sep 17 00:00:00 2001 From: Seth Forsgren Date: Tue, 6 Dec 2022 11:52:28 -0800 Subject: [PATCH] formatting promptString for sharing --- components/Share.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/Share.tsx b/components/Share.tsx index ec5ac90..3026542 100644 --- a/components/Share.tsx +++ b/components/Share.tsx @@ -101,6 +101,9 @@ export default function Share({ if (numInferenceSteps != null) { var numInferenceStepsString = "&numInferenceSteps=" + numInferenceSteps } else { numInferenceStepsString = "" } if (alphaVelocity != null) { var alphaVelocityString = "&alphaVelocity=" + alphaVelocity } else { alphaVelocityString = "" } + // Format strings to have + in place of spaces for ease of sharing, note this is only necessary for prompts currently + promptString = promptString.replace(/ /g, "+"); + // create url string with the variables above combined var shareUrl = baseUrl + promptString + seedString + denoisingString + maskImageIdString + seedImageIdString + guidanceString + numInferenceStepsString + alphaVelocityString