Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add stop button when generating code #63

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move constant to constants file
  • Loading branch information
abi committed Nov 21, 2023
commit d741df41f639d089db81620ea359b19268aa70ad
3 changes: 2 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ import { Textarea } from "@/components/ui/textarea";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs";
import CodeMirror from "./components/CodeMirror";
import SettingsDialog from "./components/SettingsDialog";
import { AppState, Settings, USER_CLOSE_WEB_SOCKET_CODE } from "./types";
import { AppState, Settings } from "./types";
import { IS_RUNNING_ON_CLOUD } from "./config";
import { PicoBadge } from "./components/PicoBadge";
import { OnboardingNote } from "./components/OnboardingNote";
import { usePersistedState } from "./hooks/usePersistedState";
import { UrlInputSection } from "./components/UrlInputSection";
import TermsOfServiceDialog from "./components/TermsOfServiceDialog";
import { USER_CLOSE_WEB_SOCKET_CODE } from "./constants";

function App() {
const [appState, setAppState] = useState<AppState>(AppState.INITIAL);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const USER_CLOSE_WEB_SOCKET_CODE = 4333;
2 changes: 1 addition & 1 deletion frontend/src/generateCode.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import toast from "react-hot-toast";
import { WS_BACKEND_URL } from "./config";
import { USER_CLOSE_WEB_SOCKET_CODE } from "./types";
import { USER_CLOSE_WEB_SOCKET_CODE } from "./constants";

const ERROR_MESSAGE =
"Error generating code. Check the Developer Console for details. Feel free to open a Github issue";
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ export enum AppState {
CODING = "CODING",
CODE_READY = "CODE_READY",
}

export const USER_CLOSE_WEB_SOCKET_CODE = 4333;