Spaces:
Sleeping
Sleeping
update toaster
Browse filesFiles changed (2)
156 unmodified lines157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196156 unmodified lines<DeployButton html={html} error={error} auth={auth} /></Header><main className="max-lg:flex-col flex w-full"><divref={editor}className="w-full h-[30dvh] lg:h-full relative"onClick={(e) => {if (isAiWorking) {e.preventDefault();e.stopPropagation();toast.warn("Please wait for the AI to finish working.");}}}><Tabs /><Editorlanguage="html"theme="vs-dark"className={classNames("h-[calc(30dvh-41px)] lg:h-[calc(100dvh-96px)]",{"pointer-events-none": isAiWorking,})}value={html}onValidate={(markers) => {if (markers?.length > 0) {setError(true);}}}onChange={(value) => {const newValue = value ?? "";setHtml(newValue);setError(false);}}onMount={(editor) => (editorRef.current = editor)}/><AskAIhtml={html}setHtml={setHtml}156 unmodified lines157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196156 unmodified lines<DeployButton html={html} error={error} auth={auth} /></Header><main className="max-lg:flex-col flex w-full"><div ref={editor} className="w-full h-[30dvh] lg:h-full relative"><Tabs /><divonClick={(e) => {if (isAiWorking) {e.preventDefault();e.stopPropagation();toast.warn("Please wait for the AI to finish working.");}}}><Editorlanguage="html"theme="vs-dark"className={classNames("h-[calc(30dvh-41px)] lg:h-[calc(100dvh-96px)]",{"pointer-events-none": !isAiWorking,})}value={html}onValidate={(markers) => {if (markers?.length > 0) {setError(true);}}}onChange={(value) => {const newValue = value ?? "";setHtml(newValue);setError(false);}}onMount={(editor) => (editorRef.current = editor)}/></div><AskAIhtml={html}setHtml={setHtml}
12345623 unmodified lines303132333435import classNames from "classnames";import { useRef } from "react";import { TbReload } from "react-icons/tb";function Preview({html,23 unmodified lines<divref={ref}className="w-full border-l border-gray-900 bg-white h-[calc(70dvh-53px)] lg:h-[calc(100dvh-54px)] relative"><iframeref={iframeRef}123456723 unmodified lines31323334353637383940414243import classNames from "classnames";import { useRef } from "react";import { TbReload } from "react-icons/tb";import { toast } from "react-toastify";function Preview({html,23 unmodified lines<divref={ref}className="w-full border-l border-gray-900 bg-white h-[calc(70dvh-53px)] lg:h-[calc(100dvh-54px)] relative"onClick={(e) => {if (isAiWorking) {e.preventDefault();e.stopPropagation();toast.warn("Please wait for the AI to finish working.");}}}><iframeref={iframeRef}
src/components/App.tsx+31-31
src/components/preview/preview.tsx+8