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