Merge branch 'main' into hosted
This commit is contained in:
commit
b35738524b
@ -36,7 +36,7 @@ import toast from "react-hot-toast";
|
||||
import ImportCodeSection from "./components/ImportCodeSection";
|
||||
import { useAuth } from "@clerk/clerk-react";
|
||||
import { useStore } from "./store/store";
|
||||
import { Stack } from "./lib/stacks/types";
|
||||
import { Stack } from "./lib/stacks";
|
||||
|
||||
const IS_OPENAI_DOWN = false;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
import { Textarea } from "./ui/textarea";
|
||||
import OutputSettingsSection from "./OutputSettingsSection";
|
||||
import toast from "react-hot-toast";
|
||||
import { Stack } from "../lib/stacks/types";
|
||||
import { Stack } from "../lib/stacks";
|
||||
|
||||
interface Props {
|
||||
importFromCode: (code: string, stack: Stack) => void;
|
||||
|
||||
@ -8,8 +8,7 @@ import {
|
||||
} from "./ui/select";
|
||||
import { addEvent } from "../lib/analytics";
|
||||
import { Badge } from "./ui/badge";
|
||||
import { Stack } from "../lib/stacks/types";
|
||||
import { STACK_DESCRIPTIONS } from "../lib/stacks/descriptions";
|
||||
import { Stack, STACK_DESCRIPTIONS } from "../lib/stacks";
|
||||
|
||||
function generateDisplayComponent(stack: Stack) {
|
||||
const stackComponents = STACK_DESCRIPTIONS[stack].components;
|
||||
@ -57,7 +56,7 @@ function OutputSettingsSection({
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
{Object.values(Stack).map((stack) => (
|
||||
<SelectItem value={stack}>
|
||||
<SelectItem key={stack} value={stack}>
|
||||
<div className="flex items-center">
|
||||
{generateDisplayComponent(stack)}
|
||||
{STACK_DESCRIPTIONS[stack].inBeta && (
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
import { Stack } from "./types";
|
||||
// Keep in sync with backend (prompts/types.py)
|
||||
export enum Stack {
|
||||
HTML_TAILWIND = "html_tailwind",
|
||||
REACT_TAILWIND = "react_tailwind",
|
||||
BOOTSTRAP = "bootstrap",
|
||||
VUE_TAILWIND = "vue_tailwind",
|
||||
IONIC_TAILWIND = "ionic_tailwind",
|
||||
SVG = "svg",
|
||||
}
|
||||
|
||||
export const STACK_DESCRIPTIONS: {
|
||||
[key in Stack]: { components: string[]; inBeta: boolean };
|
||||
@ -1,9 +0,0 @@
|
||||
// Keep in sync with backend (prompts/types.py)
|
||||
export enum Stack {
|
||||
HTML_TAILWIND = "html_tailwind",
|
||||
REACT_TAILWIND = "react_tailwind",
|
||||
BOOTSTRAP = "bootstrap",
|
||||
VUE_TAILWIND = "vue_tailwind",
|
||||
IONIC_TAILWIND = "ionic_tailwind",
|
||||
SVG = "svg",
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import { Stack } from "./lib/stacks/types";
|
||||
import { Stack } from "./lib/stacks";
|
||||
|
||||
export enum EditorTheme {
|
||||
ESPRESSO = "espresso",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user