Merge main into sweep/color-thief-feature
This commit is contained in:
commit
eabb40dfad
@ -116,6 +116,9 @@ function App() {
|
||||
|
||||
// Initial version creation
|
||||
function doCreate(referenceImages: string[]) {
|
||||
// Reset any existing state
|
||||
reset();
|
||||
|
||||
setReferenceImages(referenceImages);
|
||||
if (referenceImages.length > 0) {
|
||||
doGenerateCode({
|
||||
|
||||
@ -128,7 +128,7 @@ const [colors, setColors] = useState<string[]>([]);
|
||||
// Convert images to data URLs and set the prompt images state
|
||||
Promise.all(files.map((file) => fileToDataURL(file)))
|
||||
.then((dataUrls) => {
|
||||
if(dataUrls.length > 0) {
|
||||
if (dataUrls.length > 0) {
|
||||
setReferenceImages(dataUrls.map((dataUrl) => dataUrl as string));
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user