From 88b7064b66e03e465ed733a5b9284a8493370415 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 6 Oct 2022 11:17:57 -0400 Subject: [PATCH] Clean up dream --- web/components/editor/image-modal.tsx | 58 +++++++++++++-------------- web/pages/api/v0/dream.ts | 10 ++--- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/web/components/editor/image-modal.tsx b/web/components/editor/image-modal.tsx index bef785f0..cf1c8346 100644 --- a/web/components/editor/image-modal.tsx +++ b/web/components/editor/image-modal.tsx @@ -22,35 +22,32 @@ export function ImageModal(props: { const { upload, open, setOpen } = props return ( - - - { - setOpen(false) - upload.mutate(files) - }} - className="relative block w-full rounded-lg border-2 border-dashed border-gray-300 p-12 text-center hover:border-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" - > - - - Upload an image file - - - - ), - }, - { - title: 'Dream', - content: , - }, - ]} - /> - + { + setOpen(false) + upload.mutate(files) + }} + className="relative block w-full rounded-lg border-2 border-dashed border-gray-300 p-12 text-center hover:border-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" + > + + + Upload an image file + + + ), + }, + { + title: 'Dream', + content: , + }, + ]} + /> ) } @@ -85,7 +82,7 @@ function DreamTab(props: { apiKey: API_KEY, } const headers = { - 'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K', + 'Content-Type': 'application/json', } const response = await fetch(url, { method: 'POST', @@ -128,7 +125,6 @@ function DreamTab(props: { {/* Show the current imageUrl */} {imageUrl && ( <> - {' '} Image