Merge pull request #7 from shtepcell/feature/error-message

fix: add error message
pull/9/head
Sawyer Hood 3 years ago committed by GitHub
commit 946c32ad6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,6 +82,12 @@ function ExportButton({ setHtml }: { setHtml: (html: string) => void }) {
});
const json = await resp.json();
if (json.error) {
alert(json.error.message);
return;
}
const message = json.choices[0].message.content;
const start = message.indexOf("<!DOCTYPE html>");
const end = message.indexOf("</html>");

Loading…
Cancel
Save