Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
Add Enter key support for URL screenshot capture
Abi Rajab94cf77cdedd
diff --git a/design-docs/todo-list.md b/design-docs/todo-list.mdindex 4b14317c..aff8fa1a 100644--- a/design-docs/todo-list.md+++ b/design-docs/todo-list.md@@ -1,2 +1,2 @@-1. enter should trigger generation in URL textbox+1. ✓ enter should trigger generation in URL textbox2. ✓ write some tests for the URL normalizationdiff --git a/frontend/src/components/UrlInputSection.tsx b/frontend/src/components/UrlInputSection.tsxindex 18422d61..25ab5e5d 100644--- a/frontend/src/components/UrlInputSection.tsx+++ b/frontend/src/components/UrlInputSection.tsx@@ -65,6 +65,11 @@ export function UrlInputSection({ doCreate, screenshotOneApiKey }: Props) {placeholder="Enter URL"onChange={(e) => setReferenceUrl(e.target.value)}value={referenceUrl}+ onKeyDown={(e) => {+ if (e.key === "Enter" && !isLoading) {+ takeScreenshot();+ }+ }}/><ButtononClick={takeScreenshot}