MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / doImport

Function doImport

frontend/src/components/ImportCodeSection.tsx:25–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 const [stack, setStack] = useState<Stack | undefined>(undefined);
24
25 const doImport = () => {
26 if (code === "") {
27 toast.error("Please paste in some code");
28 return;
29 }
30
31 if (stack === undefined) {
32 toast.error("Please select your stack");
33 return;
34 }
35
36 importFromCode(code, stack);
37 };
38 return (
39 <Dialog>
40 <DialogTrigger asChild>

Callers

nothing calls this directly

Calls 1

importFromCodeFunction · 0.85

Tested by

no test coverage detected